-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
86 lines (67 loc) · 1.66 KB
/
docker-compose.yml
File metadata and controls
86 lines (67 loc) · 1.66 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
version: "3"
services:
db:
container_name: db
image: mysql:oracle
volumes:
- db_data:/var/lib/mysql
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
ports:
- '3306:3306'
environment:
- MYSQL_DATABASE=hybrid_form
- MYSQL_USER=hybrid_form
- MYSQL_PASSWORD=$MYSQL_PASSWORD
- MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
env_file:
- .env
redis:
image: redis:6.0.3
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis_data:/data
web:
image: canopy/hybrid-form-example:latest
build:
context: .
dockerfile: Dockerfile
command: sh -c "./scripts/wait-for-it.sh -h db -p 3306 -t 0 && python /code/manage.py migrate --noinput && python /code/manage.py runserver 0.0.0.0:8000"
volumes:
- .:/code:cached
ports:
- 8000:8000
depends_on:
- db
- redis
environment:
USE_DOCKER: 'on'
DJANGO_SETTINGS_MODULE: config.settings
worker:
image: canopy/hybrid-form-example:latest
build:
context: .
dockerfile: Dockerfile
command: sh -c "./scripts/wait-for-it.sh -h db -p 3306 -t 0 && celery -A config worker -l info"
volumes:
- .:/code:cached
depends_on:
- web
environment:
DJANGO_SETTINGS_MODULE: config.settings
node:
build:
context: .
dockerfile: Dockerfile.node
working_dir: /code
command: sh -c "npm run watch"
volumes:
- .:/code
- node_data:/code/node_modules
ports:
- 35729:35729
environment:
NODE_ENV: development
volumes:
db_data:
redis_data:
node_data: