-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yaml
79 lines (78 loc) · 1.68 KB
/
docker-compose.prod.yaml
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
version: '3.8'
services:
app:
image: mensa_app
build:
context: backend
dockerfile: Dockerfile.prod
volumes:
- ./backend/:/app
ports:
- 9999:9999
command: bash -c 'printenv >> /etc/environment && service cron start && python manage.py runserver 0.0.0.0:9999'
env_file:
- database-variables.env
- prod-variables.env
environment:
- CELERY_BROKER=redis://redis:6379/0
- CELERY_BACKEND=redis://redis:6379/0
depends_on:
- db
- redis
db:
image: postgres:15
volumes:
- postgres_data:/var/lib/postgresql/data/
env_file:
- database-variables.env
expose:
- '5433'
ports:
- '5433:5432'
command: -p 5433
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
depends_on:
- db
env_file:
- database-variables.env
ports:
- '8888:80'
volumes:
- pgadmin_data:/var/lib/pgadmin
restart: always
celery:
build:
context: backend
dockerfile: Dockerfile.prod
command: celery -A mensa_recommend worker -l INFO
volumes:
- ./backend/:/app
env_file:
- database-variables.env
- prod-variables.env
environment:
- CELERY_BROKER=redis://redis:6379/0
- CELERY_BACKEND=redis://redis:6379/0
depends_on:
- app
- redis
redis:
image: 'redis:alpine'
frontend:
build:
context: frontend
dockerfile: Dockerfile.prod
ports:
- '8080:8080'
command: npm run serve
container_name: vue-ui
env_file:
- prod-variables.env
volumes:
- ./frontend:/usr/src/app
- /usr/src/app/node_modules/
volumes:
postgres_data:
pgadmin_data: