-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
117 lines (107 loc) · 2.16 KB
/
docker-compose.yaml
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
version: "3.9"
services:
redis:
image: redis:7.0.5-alpine3.16
hostname: taskcamp-redis
networks:
- taskcamp
volumes:
- redisdata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
memcached:
image: memcached:1.6.17-alpine3.16
hostname: taskcamp-memcached
networks:
- taskcamp
healthcheck:
test: netstat -ltn | grep -c 11211
interval: 10s
timeout: 5s
retries: 3
postgres:
image: postgres:14.5-alpine3.16
hostname: taskcamp-postgres
env_file:
- .env
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- taskcamp
healthcheck:
test: pg_isready -U taskcamp
interval: 10s
timeout: 5s
retries: 3
rabbitmq:
image: rabbitmq:3.11.0-management-alpine
hostname: taskcamp-rabbitmq
ports:
- "15672:15672"
env_file:
- .env
networks:
- taskcamp
volumes:
- rabbitmqdata:/var/lib/rabbitmq
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 10s
timeout: 5s
retries: 3
mail:
image: iliadmitriev/mailcatcher
hostname: taskcamp-mail
networks:
- taskcamp
ports:
- "1080:1080"
django:
build:
context: ./
dockerfile: Dockerfile
image: taskcamp-django
hostname: taskcamp-django
env_file:
- .env
ports:
- "8000:8000"
networks:
- taskcamp
volumes:
- type: bind
source: ./media
target: /app/media
depends_on:
rabbitmq:
condition: service_healthy
postgres:
condition: service_healthy
memcached:
condition: service_healthy
celery:
build:
context: ./
dockerfile: Dockerfile
image: taskcamp-django
hostname: taskcamp-celery
env_file:
- .env
networks:
- taskcamp
command: celery -A worker worker -c 8
depends_on:
rabbitmq:
condition: service_healthy
postgres:
condition: service_healthy
volumes:
pgdata: {}
redisdata: {}
rabbitmqdata: {}
networks:
taskcamp:
name: taskcamp-network