forked from elpaso/django-huey-monitor
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
121 lines (115 loc) · 3.32 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
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:
- .:/django/:ro
# static files, served by caddy:
- ./volumes/django/static/:/static/:rw
# Use files, served by django:
- ./volumes/django/media/:/media/:rw
entrypoint: /django/docker/django/entrypoint.sh
huey1:
build:
context: .
dockerfile: docker/django/Dockerfile
deploy:
resources:
limits:
cpus: '0.50'
memory: 100M
restart: "no"
hostname: huey1
env_file: ./docker/common.env
links:
- postgres:postgres
- redis:redis
depends_on:
- django
volumes:
- .:/django/:ro
# static files, served by caddy:
- ./volumes/django/static/:/static/:rw
# Use files, served by django:
- ./volumes/django/media/:/media/:rw
entrypoint: /django/docker/huey/entrypoint.sh
huey2:
build:
context: .
dockerfile: docker/django/Dockerfile
deploy:
resources:
limits:
cpus: '0.50'
memory: 100M
restart: "no"
hostname: huey2
env_file: ./docker/common.env
links:
- postgres:postgres
- redis:redis
depends_on:
- django
volumes:
- .:/django/:ro
# static files, served by caddy:
- ./volumes/django/static/:/static/:rw
# Use files, served by django:
- ./volumes/django/media/:/media/:rw
entrypoint: /django/docker/huey/entrypoint.sh
huey3:
build:
context: .
dockerfile: docker/django/Dockerfile
deploy:
resources:
limits:
cpus: '0.50'
memory: 100M
restart: "no"
hostname: huey3
env_file: ./docker/common.env
links:
- postgres:postgres
- redis:redis
depends_on:
- django
volumes:
- .:/django/:ro
# static files, served by caddy:
- ./volumes/django/static/:/static/:rw
# Use files, served by django:
- ./volumes/django/media/:/media/:rw
entrypoint: /django/docker/huey/entrypoint.sh
postgres:
image: postgres:11-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:
image: redis:latest
restart: "no"
hostname: redis
ports:
- "6379"
env_file: ./docker/common.env