-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
170 lines (159 loc) · 2.92 KB
/
docker-compose.yml
File metadata and controls
170 lines (159 loc) · 2.92 KB
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
version: '3.6'
x-logging:
&default-logging
driver: syslog
options:
syslog-facility: daemon
services:
#redis
redis:
image: redis:5-alpine
restart: always
logging:
<< : *default-logging
options:
tag: twin-redis
ports:
- 8051:6379
networks:
- twin_network
#nginx
nginx:
image: twin/nginx
build:
context: .
dockerfile: docker/nginx/Dockerfile
restart: always
volumes:
- .:/opt/app
depends_on:
- app
logging:
<< : *default-logging
options:
tag: twin-nginx
ports:
- 8050:80
networks:
- twin_network
#django app
app:
image: twin/app
build:
context: .
dockerfile: docker/app/Dockerfile
volumes:
- .:/opt/app
depends_on:
- postgres
- redis
restart: always
working_dir: /opt/app
logging:
<< : *default-logging
options:
tag: twin-app
environment:
- PYTHONPATH=/opt/app
- DEBUG=1
- DJANGO_SETTINGS_MODULE=twin.settings
env_file:
- .env
command: |
gunicorn
--config file:docker/app/gunicorn_conf.py
twin.wsgi:application
ports:
- 8052:3000
- 8053:8080
networks:
- twin_network
#adminer
adminer:
image: adminer
restart: always
ports:
- 8054:8080
networks:
- twin_network
#jupyter notebook
notebook:
image: twin/app
volumes:
- .:/opt/app
depends_on:
- app
restart: always
working_dir: /opt/app
logging:
<< : *default-logging
options:
tag: twin-notebook
environment:
- PYTHONPATH=/opt/app
- DEBUG=1
- NOTEBOOK=1
- DJANGO_SETTINGS_MODULE=twin.settings
env_file:
- .env
command: |
python manage.py
shell_plus --notebook
ports:
- 8055:8888
networks:
- twin_network
postgres:
image: twin/postgres
build:
context: .
dockerfile: docker/postgres/Dockerfile
volumes:
- postgres-twin-data:/var/lib/postgresql/data
- .:/opt/app
restart: always
env_file:
- .env
logging:
<< : *default-logging
options:
tag: twin-postgres
ports:
- 8056:5432
networks:
- twin_network
#celery
celery:
image: twin/app
volumes:
- .:/opt/app
depends_on:
- app
restart: always
working_dir: /opt/app
logging:
<< : *default-logging
options:
tag: twin-celery
environment:
- PYTHONPATH=/opt/app
- DEBUG=1
- DJANGO_SETTINGS_MODULE=twin.settings
env_file:
- .env
command: |
celery -A twin worker
--concurrency 2
--loglevel INFO
networks:
- twin_network
volumes:
postgres-twin-data:
external: true
networks:
twin_network:
name: twin_network
ipam:
driver: default
config:
- subnet: "172.31.6.0/24"