-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathdocker-compose-prod.yml
81 lines (76 loc) · 1.47 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
services:
db:
image: postgres:11
restart: always
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- ./spacedock-db:/var/lib/postgresql/data
ports:
- 5432:5432
networks:
- spacedock-net
redis:
image: redis:latest
networks:
- spacedock-net
backend:
image: spacedock_backend_prod
build:
context: ./
target: backend-prod
user: spacedock
restart: always
environment:
- FLASK_ENV=production
- FLASK_DEBUG=0
- CONNECTION_STRING=${CONNECTION_STRING}
command: >
uwsgi
--module KerbalStuff.app:app
--master
--processes=16
--enable-threads
--http=0.0.0.0:9999
--vacuum
--die-on-term
--lazy-apps
volumes:
- ./storage:/opt/spacedock/storage
links:
- db
- celery
networks:
- spacedock-net
celery:
image: spacedock_celery
build:
context: ./
target: celery
user: spacedock
environment:
- CONNECTION_STRING=${CONNECTION_STRING}
command: >
celery
-A KerbalStuff.celery:app
worker
--loglevel=INFO
-B
links:
- redis
networks:
- spacedock-net
frontend:
image: spacedock_frontend
build: frontend
restart: always
ports:
- 80:80
links:
- backend
networks:
- spacedock-net
networks:
spacedock-net:
driver: bridge