-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.production.yml
65 lines (59 loc) · 1.3 KB
/
docker-compose.production.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
version: '3.5'
services:
nginx_frontend:
build:
context: ./frontend
dockerfile: Dockerfile.production
args:
REACT_APP_BACKEND_URL: http://localhost:8000/
restart: always
volumes:
- backend_static_files:/var/www/localhost/htdocs/backend:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
expose:
- 80
- 8000
ports:
- 80:80
- 8000:8000
depends_on:
- backend
backend:
build:
context: ./backend
dockerfile: Dockerfile.production
image: &backend backend
restart: always
volumes:
- backend_static_files:/app/staticfiles
- ./backend/uploads:/app/uploads
depends_on:
- db
env_file: production.env
worker:
image: *backend
command: celery --app=backend worker --hostname=worker@%h
restart: always
depends_on:
- db
- redis
env_file: production.env
db:
image: postgres:11.3
restart: always
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
POSTGRES_USER: sap-ichi2020
POSTGRES_PASSWORD: SNhd7GEk
POSTGRES_DB: sap-ichi2020
redis:
image: redis:5.0
restart: always
volumes:
- redis_data:/data
volumes:
backend_uploads:
backend_static_files:
postgres_data:
redis_data: