-
Notifications
You must be signed in to change notification settings - Fork 42
/
compose.yml
114 lines (87 loc) · 2 KB
/
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
106
107
108
109
110
111
112
113
114
# Reference docs: https://docs.docker.com/compose/compose-file/compose-file-v3/
services:
db:
container_name: db
image: postgres:latest
init: true
volumes:
- postgres_data:/var/lib/postgresql/data/
ports:
- "5432:5432"
env_file:
- .env
redis:
container_name: redis
image: redis:7.0
init: true
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis_data:/data
web:
container_name: web
image: epicserve/django-base-site:python
init: true
build:
context: .
dockerfile: config/docker/Dockerfile.web
target: dev
command: sh -c "./manage.py migrate --noinput && ./manage.py runserver 0.0.0.0:8000"
volumes:
- .:/srv/app:cached
ports:
- "8000:8000"
depends_on:
- node
- db
- redis
environment:
USE_DOCKER: 'on'
DJANGO_SETTINGS_MODULE: config.settings
worker:
container_name: worker
image: epicserve/django-base-site:python
init: true
command: sh -c "celery -A config worker -l info"
volumes:
- .:/srv/app:cached
depends_on:
- web
environment:
DJANGO_SETTINGS_MODULE: config.settings
node:
container_name: node
image: epicserve/django-base-site:node
build:
context: .
dockerfile: config/docker/Dockerfile.node
init: true
working_dir: /srv/app
command: sh -c "npm run dev"
volumes:
- .:/srv/app
- node_modules:/srv/app/node_modules
ports:
- "3000:3000"
environment:
NODE_ENV: development
docs:
container_name: docs
image: epicserve/django-base-site:python
init: true
command: sh -c "mkdocs serve -f config/mkdocs.yml --dev-addr 0.0.0.0:4000"
volumes:
- .:/srv/app:cached
ports:
- "4000:4000"
environment:
LIVE_RELOAD_SUPPORT: 'true'
FAST_MODE: 'true'
profiles:
- full
- docs
depends_on:
- web
volumes:
postgres_data:
redis_data:
node_modules: