Skip to content

Commit

Permalink
Separate proxy setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mlukanova committed Apr 11, 2023
1 parent 3e93157 commit 0c0eab5
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 17 deletions.
49 changes: 49 additions & 0 deletions docker/prod/compose-proxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
version: "3.1"

networks:
shared-cudos-network:
name: shared-cudos-network

volumes:
cudosallowlistdbdata:
driver: local

services:
cudos-allowlist:
image: cudos-allowlist
container_name: cudos-allowlist
build:
dockerfile: docker/prod/docker.prod.dockerfile
context: ../../
args:
args:
USER_ID: "$USER_ID"
USER_NAME: "$USER_NAME"
GROUP_ID: "$GROUP_ID"
GROUP_NAME: "$GROUP_NAME"
restart: unless-stopped
volumes:
- "../../:/usr/src/cudos-allowlist"
ports:
- "$HOST_PORT:$DOCKER_PORT"
networks:
- shared-cudos-network
extra_hosts:
- "host.docker.internal:host-gateway"
logging:
driver: ${LOGGING_DRIVER}
depends_on:
- cloudsql-proxy

cloudsql-proxy:
container_name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.11
command: /cloud_sql_proxy --dir=/cloudsql -instances=${GCLOUD_INSTANCE_CONNECTION_NAME}=tcp:0.0.0.0:5432
ports:
- 5432:5432
environment:
HASURA_GRAPHQL_DATABASE_URL: ${GCLOUD_INSTANCE_CONNECTION_NAME}
extra_hosts:
- "host.docker.internal:host-gateway"
restart: always

17 changes: 0 additions & 17 deletions docker/prod/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ volumes:
driver: local

services:


cudos-allowlist:
image: cudos-allowlist
container_name: cudos-allowlist
Expand All @@ -34,18 +32,3 @@ services:
- "host.docker.internal:host-gateway"
logging:
driver: ${LOGGING_DRIVER}
depends_on:
- cloudsql-proxy

cloudsql-proxy:
container_name: cloudsql-proxy
image: gcr.io/cloudsql-docker/gce-proxy:1.11
command: /cloud_sql_proxy --dir=/cloudsql -instances=${GCLOUD_INSTANCE_CONNECTION_NAME}=tcp:0.0.0.0:5432
ports:
- 5432:5432
environment:
HASURA_GRAPHQL_DATABASE_URL: ${GCLOUD_INSTANCE_CONNECTION_NAME}
extra_hosts:
- "host.docker.internal:host-gateway"
restart: always

0 comments on commit 0c0eab5

Please sign in to comment.