-
Notifications
You must be signed in to change notification settings - Fork 21
/
docker-compose.yml
74 lines (69 loc) · 1.55 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
version: "3"
services:
db:
restart: always
image: ${MYSQL_IMAGE}
container_name: izone_db
volumes:
- ./db/mysql:/var/lib/mysql
- ./db/my.cnf:/etc/my.cnf:ro
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${IZONE_MYSQL_NAME}
networks:
- backend
redis:
restart: always
image: ${REDIS_IMAGE}
container_name: izone_redis
volumes:
- ./redis/data:/data
networks:
- backend
web:
restart: always
image: ${IZONE_IMAGE}
container_name: izone_web
environment:
IZONE_MYSQL_PASSWORD: ${MYSQL_ROOT_PASSWORD}
IZONE_MYSQL_HOST: db
IZONE_MYSQL_NAME: ${IZONE_MYSQL_NAME}
IZONE_MYSQL_USER: root
IZONE_MYSQL_PORT: 3306
IZONE_REDIS_HOST: redis
IZONE_REDIS_PORT: 6379
env_file:
- ./izone.env
volumes:
- ./web/static:/opt/cloud/izone/static
- ./web/media:/opt/cloud/izone/media
- ./web/whoosh_index:/opt/cloud/izone/whoosh_index
- ./web/log:/opt/cloud/izone/log
links:
- db
- redis
depends_on:
- db
- redis
networks:
- backend
- frontend
nginx:
restart: always
image: ${NGINX_IMAGE}
container_name: izone_nginx
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- ./web/static:/usr/share/nginx/izone/static
- ./web/media:/usr/share/nginx/izone/media
ports:
- "${NGINX_PORT}:80"
links:
- web
networks:
- frontend
networks:
backend:
driver: bridge
frontend:
driver: bridge