Running GoToSocial on Cloud Run .
Environment or Substitution Variables
Name
Description
GTS_HOST
See https://docs.gotosocial.org/en/latest/configuration/general/ , required
GTS_DB_ADDRESS
See https://docs.gotosocial.org/en/latest/configuration/database/ , required
GTS_DB_PORT
See https://docs.gotosocial.org/en/latest/configuration/database/ , required
GTS_DB_USER
See https://docs.gotosocial.org/en/latest/configuration/database/ , required
GTS_DB_DATABASE
See https://docs.gotosocial.org/en/latest/configuration/database/ , required
GTS_DB_PASSWORD
See https://docs.gotosocial.org/en/latest/configuration/database/ , required
GTS_STORAGE_S3_ENDPOINT
See https://docs.gotosocial.org/en/latest/configuration/storage/ , required
GTS_STORAGE_S3_BUCKET
See https://docs.gotosocial.org/en/latest/configuration/storage/ , required
GTS_STORAGE_S3_ACCESS_KEY
See https://docs.gotosocial.org/en/latest/configuration/storage/ , required
GTS_STORAGE_S3_SECRET_KEY
See https://docs.gotosocial.org/en/latest/configuration/storage/ , required
REGION
Region of Cloud Run Instances, required
IMAGE_NAME
Image name of docker image, required
Create a Google Cloud Project
Enable billing for a project
Create buckets
Setup Artifact Registry
Setup Cloud Run
Setup Building repositories from GitHub
Create a Cloud Build trigger
Apply the following IAM roles:
Cloud Build Service Account
Service Account User
Cloud Run Admin
Prepare a storage bucket used by GTS_STORAGE_S3_*
Setup substitution variables and secrets
Trigger the Cloud Build trigger
Mapping custom domains to the Cloud Run service named "gts"
Place a .env to project root
Run docker build -t gts .
Run docker run --rm -p 8080:8080 --env-file=.env gts
Run docker exec -it <container id> sh
Do something like https://docs.gotosocial.org/en/latest/getting_started/user_creation/
Can I create a user on Cloud Run Instance?
As far as I know, you can't. Please following the local deployment steps.
Or create Cloud Run jobs with same container image but change command or args .