-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
158 lines (158 loc) · 3.75 KB
/
docker-compose.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
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
version: '3'
services:
redishost:
build:
context: .
dockerfile: ./dockerfiles/redis_cm_docker
user: 999:999
logging:
driver: "json-file"
options:
max-size: "100m"
networks:
nginx_net:
ipv4_address: "172.21.0.3"
volumes:
- "/storage/dashboard_data/redis_cm:/data"
healthcheck:
test: redis-cli ping
interval: 1m30s
timeout: 10s
retries: 3
restart: always
redis_celery:
build:
context: .
dockerfile: ./dockerfiles/redis_celery_docker
logging:
driver: "json-file"
options:
max-size: "100m"
volumes:
- "/storage/dashboard_data/celery:/data/"
networks:
nginx_net:
ipv4_address: "172.21.0.4"
healthcheck:
test: redis-cli ping
interval: 1m30s
timeout: 10s
retries: 3
restart: always
django_db:
build:
context: .
dockerfile: ./dockerfiles/psql
command:
- "postgres"
- "-c"
- "max_connections=1000"
- "-c"
- "shared_buffers=30GB"
user: 999:999
logging:
driver: "json-file"
options:
max-size: "100m"
volumes:
- /storage/dashboard_data/psql:/var/lib/postgresql/data
ports:
- 5432:5432
env_file:
- .env
networks:
nginx_net:
ipv4_address: "172.21.0.6"
healthcheck:
test: pg_isready
interval: 1m30s
timeout: 10s
retries: 3
restart: always
app:
build:
context: .
dockerfile: ./dockerfiles/docker_app
image: heranow_app:latest
logging:
driver: "json-file"
options:
max-size: "100m"
volumes:
- /storage/dashboard_data/media:/app/media
env_file:
- .env
command: /app/dockerfiles/entrypoints/entrypoint.sh
networks:
nginx_net:
ipv4_address: "172.21.0.2"
depends_on:
- redishost
- redis_celery
- django_db
restart: always
celery:
image: heranow_app:latest
logging:
driver: "json-file"
options:
max-size: "100m"
command: /app/dockerfiles/entrypoints/entrypoint_celery.sh
env_file:
- .env
volumes:
- /storage/dashboard_data/media:/app/media
depends_on:
- redis_celery
- redishost
- django_db
restart: always
networks:
nginx_net:
ipv4_address: "172.21.0.5"
celery-beat:
image: heranow_app:latest
logging:
driver: "json-file"
options:
max-size: "100m"
command: /app/dockerfiles/entrypoints/entrypoint_beat.sh
env_file:
- .env
depends_on:
- redis_celery
- redishost
- django_db
restart: always
networks:
nginx_net:
ipv4_address: "172.21.0.7"
nginx:
image: nginx:1.13
logging:
driver: "json-file"
options:
max-size: "100m"
env_file:
- .env
ports:
- $PORT:443
volumes:
- ./dockerfiles/nginx:/etc/nginx/conf.d
- /home/locoadmin/webhost/:/webhost
- /storage/dashboard_data/media/:/app/media/
- /storage/dashboard_data/crontabs/:/app/crontabs/
- /storage/dashboard_data/notebooks/:/app/notebooks/
- /storage/dashboard_data/nightly_movies:/app/nightly_movies/
depends_on:
- app
restart: always
networks:
nginx_net:
ipv4_address: "172.21.0.8"
networks:
nginx_net:
driver: bridge
ipam:
config:
- subnet: "172.21.0.0/24"