-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
62 lines (58 loc) · 1.45 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
version: "3.9"
services:
postgres-service:
container_name: postgres-service-container
image: postgres:16.2
ports:
- "5432"
volumes:
- ./.pgdata:/var/lib/postgresql/pgdata
environment:
- POSTGRES_HOST=postgres-service
- POSTGRES_DB=askme-service-db
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
networks:
- postgres-service
centrifugo-service:
container_name: centrifugo-service-container
image: centrifugo/centrifugo:v5
volumes:
- ./centrifugo/config.json:/centrifugo/config.json
command: centrifugo -c config.json
ports:
- "8001:8001"
ulimits:
nofile:
soft: 65535
hard: 65535
networks:
- centrifugo-service
askme-service:
container_name: askme-service-container
build:
context: .
ports:
- "8000:8000"
volumes:
- .:/app
environment:
- POSTGRES_HOST=postgres-service
- POSTGRES_DB=askme-service-db
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
depends_on:
- postgres-service
- centrifugo-service
command: >
sh -c "python app/manage.py generate_top_users &&
python app/manage.py generate_top_tags &&
cd app/ && gunicorn -c core/gunicorn.conf.py core.wsgi"
networks:
- postgres-service
- centrifugo-service
networks:
postgres-service:
driver: bridge
centrifugo-service:
driver: bridge