forked from diffgram/diffgram
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
133 lines (132 loc) · 3.3 KB
/
docker-compose.yaml
File metadata and controls
133 lines (132 loc) · 3.3 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
version: "3.9"
services:
dispatcher:
image: gcr.io/diffgram-open-core/local_dispatcher:latest
ports:
- "0.0.0.0:8085:8085"
expose: [8085]
depends_on:
- frontend
- default
- walrus
environment:
SAME_HOST: ${SAME_HOST}
frontend:
image: gcr.io/diffgram-open-core/frontend:${DIFFGRAM_VERSION_TAG}
ports:
- "0.0.0.0:8081:80"
expose: [80]
depends_on:
- default
eventhandlers:
image: gcr.io/diffgram-open-core/eventhandlers:${DIFFGRAM_VERSION_TAG}
ports:
- "0.0.0.0:8086:8086"
expose: [8086]
depends_on:
db:
condition: service_healthy
default:
condition: service_started
rabbitmq:
condition: service_healthy
volumes:
- ${GCP_SERVICE_ACCOUNT_FILE_PATH}:/gcp/gcp-service-account.json
env_file:
- .env
environment:
PYTHONPATH: "/app/"
DIFFGRAM_SERVICE_NAME: eventhandlers
entrypoint: ["python3", "-u", "/app/main.py"]
walrus:
image: gcr.io/diffgram-open-core/walrus:${DIFFGRAM_VERSION_TAG}
ports:
- "0.0.0.0:8082:8082"
expose: [8082]
depends_on:
db:
condition: service_healthy
default:
condition: service_started
rabbitmq:
condition: service_healthy
volumes:
- ${GCP_SERVICE_ACCOUNT_FILE_PATH}:/gcp/gcp-service-account.json
env_file:
- .env
environment:
PYTHONPATH: "/app/"
DIFFGRAM_SERVICE_NAME: walrus
entrypoint: ["python3", "-u", "/app/main.py"]
default:
image: gcr.io/diffgram-open-core/default:${DIFFGRAM_VERSION_TAG}
healthcheck:
test: curl --fail http://default:8080 || exit 1
interval: 30s
timeout: 30s
retries: 5
start_period: 80s
ports:
- "0.0.0.0:8080:8080"
expose: [8080]
depends_on:
db:
condition: service_healthy
rabbitmq:
condition: service_healthy
db_migration:
condition: service_completed_successfully
volumes:
- ${GCP_SERVICE_ACCOUNT_FILE_PATH}:/gcp/gcp-service-account.json
env_file:
- .env
environment:
PYTHONPATH: "/app/"
DIFFGRAM_SERVICE_NAME: default
command: ["python3", "-u", "/app/main.py"]
db_migration:
image: gcr.io/diffgram-open-core/default:${DIFFGRAM_VERSION_TAG}
env_file:
- .env
environment:
PYTHONPATH: "/app/"
command: ["/app/db-init.sh", "${DATABASE_HOST}"]
depends_on:
db:
condition: service_healthy
rabbitmq:
condition: service_healthy
db:
image: ${POSTGRES_IMAGE}
hostname: db
restart: always
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-d", "db_prod" ]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_DB=diffgram
volumes:
# Default INTERNAL_POSTGRES_DIR=/var/lib/postgresql/data:Z
- ${POSTGRES_DATA_DIR:-./postgres-data}:${INTERNAL_POSTGRES_DIR:-/var/lib/postgresql/data}
ports:
- 5432:5432
rabbitmq:
image: rabbitmq:3.10-rc-management-alpine
env_file:
- .env
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
container_name: 'rabbitmq'
expose: [5672, 15672]
ports:
- 5672:5672
- 15672:15672
volumes:
static: {}