-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
98 lines (98 loc) · 2.07 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
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
version: "3.8"
services:
web:
build: .
working_dir: /ElephantBook/
command: ./startup.sh gunicorn
volumes:
- ElephantBook:/ElephantBook/
- static:/ElephantBook/static/
- media:/ElephantBook/media/
- logs:/ElephantBook/logs/
restart: unless-stopped
expose:
- 8000
env_file:
- ./.env.eb
depends_on:
- db
db:
image: postgres:alpine
command: postgres -c 'config_file=/etc/postgresql/postgresql.conf'
volumes:
- ./postgresql.conf:/etc/postgresql/postgresql.conf
- postgres_data:/var/lib/postgresql/data/
env_file:
- ./.env.db
nginx:
image: nginx
restart: always
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./privkey.pem:/privkey.pem:ro
- ./fullchain.pem:/fullchain.pem:ro
- static:/static/:ro
- media:/media/:ro
- logs:/var/log/nginx/
ports:
- 80:80
- 443:443
depends_on:
- web
celery:
build: .
working_dir: /ElephantBook/
command: celery -A ElephantBook worker --beat --scheduler django -l info
volumes:
- ElephantBook:/ElephantBook/:ro
- static:/ElephantBook/static/:ro
- media:/ElephantBook/media/:ro
- logs:/ElephantBook/logs/
env_file:
- ./.env.eb
depends_on:
- web
- redis
redis:
image: redis
jupyter:
build: .
working_dir: /ElephantBook/
command: python manage.py shell_plus --lab
volumes:
- ElephantBook:/ElephantBook/
- static:/ElephantBook/static/
- media:/ElephantBook/media/
restart: unless-stopped
ports:
- 8888:8888
env_file:
- ./.env.eb
depends_on:
- db
volumes:
postgres_data:
ElephantBook:
driver: local
driver_opts:
type: none
o: bind
device: .
static:
driver: local
driver_opts:
type: none
o: bind
device: ./static/
media:
driver: local
driver_opts:
type: none
o: bind
device: ./media/
logs:
driver: local
driver_opts:
type: none
o: bind
device: ./logs/