This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create the tasks.json file in the .vscode folder, making sure you have the right commands | |
Allow VSCode to run tasks automatically: | |
CTRL+P / CTRL+SHIFT+P (windows) | |
>Tasks: Manage Automatic Tasks in Folder | |
> > Allow Automatic Tasks In Folder | |
Restart VS Code and VIOLA! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So you want to set up remix in cloud run huh? It's pretty simple but i'm going to assume you can figure out most of the GCP UI on your own. | |
Cloud Run: | |
Step 1: Create a new service and take note of the service ID | |
Step 2: Allow all traffic in the /triggers tab | |
Cloud Build: | |
Step 1: Set up a Cloud Build trigger on your repo | |
Step 2: Point the configuration to "cloud build configuration file" at the root of your project | |
Step 3: Add the following to the substitution variables (so you can keep it safe): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So Github workflow for deploying a docker image to GCR, and subsequently pushing that to a cloud run instance is pretty easy | |
First just add your github tokens: | |
GCP_SERVICE_ID | |
GCP_PROJECT_ID | |
GCP_REGION <-- your services deploy region | |
GCP_SA_KEY <-- Follow the method in here (http://acaird.github.io/computers/2020/02/11/github-google-container-cloud-run) | |
Take note that my Dockerfile is specifically for an Express.js remix app, where Remix builds to `/server/build`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So once you figure out all the caveats, running Keystone on Docker and in Fly.io is relatively simple. | |
package.json: | |
You need --fix on your setup script for Docker to auto update the schemas | |
"setup": "keystone postinstall --fix" | |
NOTES FOR DOCKER: | |
1. I use Yarn V3 in a monorepo hence the corepack lines and project structure |