-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
34 lines (32 loc) · 1019 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
version: '3'
# This is set up to run in an authenticated docker environment. See instructions here: https://cloud.google.com/artifact-registry/docs/docker/authentication
# If you are executing this in Google Cloud Shell, you can skip the configuration above.
services:
pgadapter:
image: gcr.io/cloud-spanner-pg-adapter/pgadapter-distroless
ports:
- "5432:5432"
env_file:
- .env
command: [ "/bin/bash", "/home/pgadapter/startup.sh", "-p", "${SPANNER_PROJECT}", "-i", "${SPANNER_INSTANCE}", "-d", "${SPANNER_DATABASE}", "-x" ]
healthcheck:
test: [ "CMD", "bash", "-c", "echo >/dev/tcp/localhost/5432" ]
interval: 10s
timeout: 5s
retries: 3
app-cloudsql:
build:
context: .
image: app-cloudsql
env_file:
- .env
command: [ "java", "-jar", "app.jar", "cloudsql" ]
app-spanner:
build:
context: .
image: app-spanner
depends_on:
- pgadapter
env_file:
- .env
command: [ "java", "-jar", "app.jar", "spanner" ]