Skip to content

Instantly share code, notes, and snippets.

View TheRealFlyingCoder's full-sized avatar

Tom Rowe TheRealFlyingCoder

View GitHub Profile
@TheRealFlyingCoder
TheRealFlyingCoder / VSCodeAutoTerminals
Last active November 10, 2021 04:07
VSCode - Remix dev and Tailwind in split terminal on project startup
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!
@TheRealFlyingCoder
TheRealFlyingCoder / Cloud Run & Remix
Last active September 30, 2024 19:56
Remix & Cloud Run
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):
@TheRealFlyingCoder
TheRealFlyingCoder / . Github Actions: Remix + Cloud Run + Docker
Last active November 12, 2024 17:45
Github Actions: Remix + Cloud Run + Docker
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`.
@TheRealFlyingCoder
TheRealFlyingCoder / .Keystone.js with Docker and Fly.io
Last active January 10, 2023 13:24
Keystone.js with Docker and Fly.io
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