knokmki612 / pub.kimiaki.space

Running GoToSocial on Cloud Run.

Home Page:https://pub.kimiaki.space

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pub.kimiaki.space

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

Deployment

  1. Create a Google Cloud Project
  2. Enable billing for a project
  3. Create buckets
  4. Setup Artifact Registry
  5. Setup Cloud Run
  6. Setup Building repositories from GitHub
  7. 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_*
  8. Setup substitution variables and secrets
  9. Trigger the Cloud Build trigger
  10. Mapping custom domains to the Cloud Run service named "gts"

Local

  1. Place a .env to project root
  2. Run docker build -t gts .
  3. Run docker run --rm -p 8080:8080 --env-file=.env gts
  4. Run docker exec -it <container id> sh
  5. Do something like https://docs.gotosocial.org/en/latest/getting_started/user_creation/

FAQ

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.

About

Running GoToSocial on Cloud Run.

https://pub.kimiaki.space

License:Creative Commons Zero v1.0 Universal


Languages

Language:Dockerfile 70.3%Language:Shell 29.7%