-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.prod.yml
101 lines (95 loc) · 2.74 KB
/
docker-compose.prod.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
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
version: "3.9"
services:
dashboard:
image: ghcr.io/rwth-time/shoutout/dashboard
restart: always
ports:
- "8000:80"
environment:
- MINIO_ENDPOINT=localhost # TODO update this to external hostname
- MINIO_PORT=9000
- MINIO_ACCESS_KEY=shoutoutdevuser
- MINIO_SECRET_KEY=shoutoutdevuser
- MINIO_SSL_ENABLED=false # TODO toggle if your endpoint is supporting valid https
- RABBITMQ_URL=amqp://rabbit:rabbit@rabbitmq
- DATABASE_URL=postgresql://admin:admin@postgres:5432/postgres?schema=public
depends_on:
- postgres
- minio
- rabbitmq
worker:
image: ghcr.io/rwth-time/shoutout/worker
restart: always
environment:
- DATABASE_HOST=postgres
- DATABASE_NAME=postgres
- DATABASE_USER=admin
- DATABASE_PASSWORD=admin
- DATABASE_PORT=5432
- RABBITMQ_HOST=rabbitmq
- RABBITMQ_USER=rabbit
- RABBITMQ_PASSWORD=rabbit
- MINIO_SECRET_KEY=shoutoutdevuser
- MINIO_ACCESS_KEY=shoutoutdevuser
- MINIO_URL=http://minio:9000/
- LOG_LEVEL=INFO
depends_on:
- postgres
- minio
- rabbitmq
deploy:
mode: replicated
replicas: 2
# TODO GPU: If you haven't installed the nividia-container-toolkit delete the following part:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
postgres:
image: postgres
restart: always
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin
ports:
- "5433:5432"
volumes:
- shoutout-db-data:/var/lib/postgresql/data
minio:
image: quay.io/minio/minio
restart: always
command: server /data --console-address ":9001"
environment:
- MINIO_ROOT_USER=minioadmin
- MINIO_ROOT_PASSWORD=minioadmin
volumes:
- minio_data:/data
ports:
- "9000:9000"
- "9001:9001"
mc:
image: minio/mc
entrypoint: >
/bin/sh -c "
/bin/bash -c 'while ! $((echo >/dev/tcp/minio/9000) &>/dev/null); do echo waiting for minio; sleep 3; done; echo minio healthcheck successful;';
/usr/bin/mc config host add minio http://minio:9000 minioadmin minioadmin;
/usr/bin/mc mb minio/shoutout-job-bucket;
/usr/bin/mc admin user add minio shoutoutdevuser shoutoutdevuser;
/usr/bin/mc admin policy attach minio readwrite --user shoutoutdevuser;
exit 0;"
rabbitmq:
image: rabbitmq:management
restart: always
environment:
- RABBITMQ_DEFAULT_USER=rabbit
- RABBITMQ_DEFAULT_PASS=rabbit
ports:
- "5672:5672"
- "15672:15672"
volumes:
- ./conf/advanced.config:/etc/rabbitmq/advanced.config:ro
volumes:
shoutout-db-data:
minio_data: