-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (73 loc) · 1.39 KB
/
docker-compose.yml
File metadata and controls
81 lines (73 loc) · 1.39 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
---
volumes:
volume_db:
volume_static:
networks:
net_db:
net_front:
services:
redis:
image: redis:8-alpine
container_name: redis
networks:
- net_db
ports:
- "6379:6379"
volumes:
- volume_db:/data
read_only: true
deploy:
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 5
window: 120s
snakes:
depends_on:
- redis
environment:
REDIS_HOST: redis
image: carrots/snakes-snakes:latest
build: ./appcode/
container_name: snakes
user: root
cap_add:
- SYS_ADMIN
- MKNOD
security_opt:
- apparmor:unconfined
networks:
- net_db
command: snakes-run
restart: always
django:
depends_on:
- redis
environment:
REDIS_HOST: redis
SECRET_KEY: thisIsNotARealSecretKeyReally
image: carrots/snakes-django:latest
build: ./appcode/
container_name: django
networks:
- net_db
- net_front
volumes:
- volume_static:/srv/appenv/app/static
command: django-run
restart: always
nginx:
depends_on:
- django
image: carrots/snakes-nginx:latest
build: ./nginx/
container_name: nginx
ports:
- "8000:80"
networks:
- net_front
volumes:
- /var/cache/nginx
- /var/run
- volume_static:/srv/appenv/app/static
restart: always