-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yml
More file actions
75 lines (70 loc) · 1.63 KB
/
compose.yml
File metadata and controls
75 lines (70 loc) · 1.63 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
version: '3.8'
services:
database:
container_name: database
image: postgres
ports:
- "5432:5432"
environment:
- "POSTGRES_USER=${POSTGRES_USER}"
- "POSTGRES_PASSWORD=${POSTGRES_PASSWORD}"
- "POSTGRES_DB=${POSTGRES_DB}"
networks:
- backend
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d image_processing_api"]
interval: 5s
retries: 5
timeout: 3s
image-processing-api:
build:
context: .
container_name: image-processing-api
ports:
- "8080:8080"
environment:
DB_MASTER: ${DB_MASTER}
SECRET_KEY: ${SECRET_KEY}
GCS_BUCKET_NAME: ${GCS_BUCKET_NAME}
GOOGLE_PROJECT_ID: ${GOOGLE_PROJECT_ID}
GOOGLE_STORAGE_URL: ${GOOGLE_STORAGE_URL}
RABBITMQ_URI: ${RABBITMQ_URI}
QUEUE_NAME: ${QUEUE_NAME}
PORT: ${PORT}
GOOGLE_APPLICATION_CREDENTIALS: /temp/keys/app_keys.json
depends_on:
database:
condition: service_healthy
rabbitmq:
condition: service_healthy
networks:
- backend
volumes:
- ${ADC}:/temp/keys/app_keys.json
migration:
build:
context: .
dockerfile: dockerfile.migrator
args:
DB_MASTER: "${DB_MASTER}"
depends_on:
database:
condition: service_healthy
networks:
- backend
rabbitmq:
container_name: rabbitmq
image: rabbitmq:4.0-management
ports:
- "5672:5672"
- "15672:15672"
networks:
- backend
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
networks:
backend:
driver: bridge