-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
39 lines (35 loc) · 906 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# spin up SQL proxy clients
version: "3.9"
# set up network for the proxy containers and gateway
networks:
sql-gateway:
name: &network-name
sql-gateway
# common configuration parameters
x-proxy-common: &proxy-container
image: eu.gcr.io/cloudsql-docker/gce-proxy:1.33.6
volumes:
- ./config:/config
networks:
- *network-name
# services
services:
gateway:
image: gateway
command: tail -F anything # simple way to wait in idle mode
container_name: gateway
build:
context: .
dockerfile: gateway/Dockerfile
depends_on:
- "proxy-a"
env_file:
- .env
networks:
- *network-name
proxy-a:
<<: *proxy-container
container_name: cloud-sql-proxy-a
command: /cloud_sql_proxy -instances=<project>:<region>:<instance-name>=tcp:0.0.0.0:5432 -credential_file=/config/credentials.json
ports:
- 127.0.0.1:5411:5432