-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
105 lines (94 loc) · 2.69 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
99
100
101
102
103
104
105
version: '2.1'
services:
mediaserver:
image: nginx:1.15-alpine
environment:
NGINX_CONF: |-
server {
listen 80;
access_log /var/log/nginx/access.log main;
location /static/files {
proxy_pass http://app:5000;
proxy_set_header Host $$host;
proxy_set_header X-Forwarded-For $$proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto "http";
}
location /protected_files {
internal;
sendfile on;
tcp_nopush on;
gzip on;
gzip_types text/plain application/x-javascript text/css;
expires 30d;
alias /var/local/meetings/instance/files;
}
}
depends_on:
- app
volumes:
- ./data-storage/files:/var/local/meetings/instance/files:ro
command: /bin/sh -c 'echo "$$NGINX_CONF" > /etc/nginx/conf.d/default.conf && exec nginx -g "daemon off;"'
app:
image: eaudeweb/mrt:${MRT_VERSION:-latest}
env_file:
- docker/app.env
environment:
- APP_VERSION=${MRT_VERSION:-latest}
- DOMAIN_NAME=http://localhost/
- UWSGI_PORT=5000
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./settings.py:/var/local/meetings/instance/settings.py:ro
- ./data-storage/files:/var/local/meetings/instance/files:z
async:
image: eaudeweb/mrt:${MRT_VERSION:-latest}
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
environment:
- DOMAIN_NAME=http://app:5000
volumes:
- ./settings.py:/var/local/meetings/instance/settings.py:ro
- ./data-storage/files:/var/local/meetings/instance/files:z
command: ["rq", "workers", "printouts"]
scheduler_cites:
image: eaudeweb/mrt:${MRT_VERSION:-latest}
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
environment:
- DOMAIN_NAME=http://app:5000
volumes:
- ./settings.py:/var/local/meetings/instance/settings.py:ro
command: ["sync_cites_meetings"]
redis:
image: redis:3.2.11-alpine
healthcheck:
test: "redis-cli -h 127.0.0.1 ping"
interval: 30s
timeout: 30s
retries: 3
command: ["redis-server", "--bind", "0.0.0.0"]
db:
image: postgres:10-alpine
env_file:
- docker/db.env
healthcheck:
test: "pg_isready -U postgres"
interval: 30s
timeout: 30s
retries: 3
volumes:
- app-data:/var/lib/postgresql/data
- ./docker/init.sql:/docker-entrypoint-initdb.d/init.sql
volumes:
app-data:
driver: local