Commit d93ff612 authored by chrml's avatar chrml
Browse files

Add cloudsql-proxy container

parent d995bdd0
......@@ -24,7 +24,7 @@ services:
- ./public/packs:/mastodon/public/packs
- ./public/system:/mastodon/public/system
depends_on:
- db
- cloudsql-proxy
- redis
streaming:
......@@ -36,7 +36,7 @@ services:
ports:
- "4000"
depends_on:
- db
- cloudsql-proxy
- redis
sidekiq:
......@@ -48,15 +48,17 @@ services:
- ./public/packs:/mastodon/public/packs
- ./public/system:/mastodon/public/system
depends_on:
- db
- cloudsql-proxy
- redis
cloudsql-proxy:
container_name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.11
command: /cloud_sql_proxy --dir=/cloudsql -instances=syoya-fujiwara:asia-northeast1:mstdn-nere9-develop=tcp:0.0.0.0:5432 -credential_file=/secrets/cloudsql/auth.json
command: ["/cloud_sql_proxy",
"-instances=syoya-fujiwara:asia-northeast1:mstdn-nere9-develop=tcp:0.0.0.0:5432",
"-credential_file=/secrets/cloudsql/auth.json"]
ports:
- 5432:5432
- 5432
volumes:
- ./auth.json:/secrets/cloudsql/auth.json
restart: always
......
......@@ -24,6 +24,8 @@ services:
- ./public/assets:/mastodon/public/assets
- ./public/packs:/mastodon/public/packs
- ./public/system:/mastodon/public/system
depends_on:
- cloudsql-proxy
streaming:
build: .
......@@ -32,7 +34,9 @@ services:
env_file: .env.production
command: yarn start
ports:
- "32782:4000"
- "4000"
depends_on:
- cloudsql-proxy
sidekiq-default: &sidekiq
build: .
......@@ -43,6 +47,8 @@ services:
volumes:
- ./public/packs:/mastodon/public/packs
- ./public/system:/mastodon/public/system
depends_on:
- cloudsql-proxy
sidekiq-mailers:
<<: *sidekiq
......@@ -55,3 +61,15 @@ services:
sidekiq-push:
<<: *sidekiq
command: bundle exec sidekiq -c 20 -q push
cloudsql-proxy:
container_name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.11
command: ["/cloud_sql_proxy",
"-instances=syoya-fujiwara:asia-northeast1:mstdn-nere9-help=tcp:0.0.0.0:5432",
"-credential_file=/secrets/cloudsql/auth.json"]
ports:
- "5432"
volumes:
- ./auth.json:/secrets/cloudsql/auth.json
restart: always
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment