forked from boxine/django-huey-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
143 lines (137 loc) · 4.56 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
version: "3.7"
services:
django:
build:
context: .
dockerfile: docker/django/Dockerfile
restart: "no"
hostname: django
ports:
- "8000:8000"
env_file: ./docker/common.env
links:
- postgres:postgres
- redis:redis
depends_on:
- postgres
- redis
volumes:
- ./docker/:/django/docker/:ro
- ./huey_monitor/:/django/huey_monitor/:ro
- ./huey_monitor_project/:/django/huey_monitor_project/:ro
#
- ./volumes/django/venv/:/django/.venv/:rw
- ./volumes/django/build/:/django/build/:rw
- ./volumes/django/static/:/static/:rw
- ./volumes/django/media/:/media/:rw
# e.g.: pip cache must be the same value as $XDG_CACHE_HOME !
- ./volumes/cache/:/pipcache/:rw
entrypoint: /django/docker/django/entrypoint.sh
huey1:
build:
context: .
dockerfile: docker/django/Dockerfile
deploy:
resources:
limits:
cpus: '0.50'
memory: 512M
restart: "no"
hostname: huey1
env_file: ./docker/common.env
links:
- postgres:postgres
- redis:redis
depends_on:
- django
volumes:
- ./docker/:/django/docker/:ro
- ./huey_monitor/:/django/huey_monitor/:ro
- ./huey_monitor_project/:/django/huey_monitor_project/:ro
#
- ./volumes/django/venv/:/django/.venv/:rw
- ./volumes/django/build/:/django/build/:rw
- ./volumes/django/static/:/static/:rw
- ./volumes/django/media/:/media/:rw
# e.g.: pip cache must be the same value as $XDG_CACHE_HOME !
- ./volumes/cache/:/pipcache/:rw
entrypoint: /django/docker/huey/entrypoint.sh
huey2:
build:
context: .
dockerfile: docker/django/Dockerfile
deploy:
resources:
limits:
cpus: '0.50'
memory: 512M
restart: "no"
hostname: huey2
env_file: ./docker/common.env
links:
- postgres:postgres
- redis:redis
depends_on:
- django
volumes:
- ./docker/:/django/docker/:ro
- ./huey_monitor/:/django/huey_monitor/:ro
- ./huey_monitor_project/:/django/huey_monitor_project/:ro
#
- ./volumes/django/venv/:/django/.venv/:rw
- ./volumes/django/build/:/django/build/:rw
- ./volumes/django/static/:/static/:rw
- ./volumes/django/media/:/media/:rw
# e.g.: pip cache must be the same value as $XDG_CACHE_HOME !
- ./volumes/cache/:/pipcache/:rw
entrypoint: /django/docker/huey/entrypoint.sh
huey3:
build:
context: .
dockerfile: docker/django/Dockerfile
deploy:
resources:
limits:
cpus: '0.50'
memory: 512M
restart: "no"
hostname: huey3
env_file: ./docker/common.env
links:
- postgres:postgres
- redis:redis
depends_on:
- django
volumes:
- ./docker/:/django/docker/:ro
- ./huey_monitor/:/django/huey_monitor/:ro
- ./huey_monitor_project/:/django/huey_monitor_project/:ro
#
- ./volumes/django/venv/:/django/.venv/:rw
- ./volumes/django/build/:/django/build/:rw
- ./volumes/django/static/:/static/:rw
- ./volumes/django/media/:/media/:rw
# e.g.: pip cache must be the same value as $XDG_CACHE_HOME !
- ./volumes/cache/:/pipcache/:rw
entrypoint: /django/docker/huey/entrypoint.sh
postgres:
# https://hub.docker.com/_/postgres
image: postgres:alpine
restart: "no"
hostname: postgres
ports:
- "5432"
env_file: ./docker/common.env
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- ./docker/postgres/init-user-db.sh:/docker-entrypoint-initdb.d/init-user-db.sh:ro
- ./volumes/postgresql/data/:/var/lib/postgresql/data/:rw
redis:
# https://hub.docker.com/_/redis
image: redis:alpine
restart: "no"
hostname: redis
ports:
- "6379"
env_file: ./docker/common.env