-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
118 lines (110 loc) · 2.52 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
services:
db:
image: postgres:16.3-alpine
env_file:
- .env
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
volumes:
- postgres_data:/var/lib/postgresql/data/
ports:
- "5432:5432"
networks:
- melnichanka
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DATABASE_USER} -d ${DATABASE_NAME}" ]
interval: 10s
timeout: 1s
retries: 5
nginx:
image: nginx:stable-alpine3.17-slim
restart: on-failure
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- /home/ubuntu/nginx-selfsigned.crt:/etc/nginx/ssl/nginx-selfsigned.crt
- /home/ubuntu/nginx-selfsigned.key:/etc/nginx/ssl/nginx-selfsigned.key
- static_volume:/app/static/
ports:
- "80:80"
- "443:443"
networks:
- melnichanka
web:
build: .
env_file: .env
ports:
- "8000:8000"
command: sh entrypoint.sh
networks:
- melnichanka
volumes:
- static_volume:/app/static/
- ./makedoc/tempdoc:/app/makedoc/tempdoc
depends_on:
db:
condition: service_healthy
rabbitmq:
image: rabbitmq:3.13.3-alpine
restart: on-failure
env_file:
- .env
ports:
- "5672:5672"
- "15672:15672"
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_DEFAULT_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_DEFAULT_PASS}
volumes:
- "rabbitmq_data:/var/lib/rabbitmq"
networks:
- melnichanka
worker:
build: .
command: celery -A melnichanka worker -l info
restart: on-failure
env_file:
- .env
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
volumes:
- .:/app
- ./makedoc/tempdoc:/app/makedoc/tempdoc
depends_on:
- db
- rabbitmq
networks:
- melnichanka
beat:
build: .
command: celery -A melnichanka beat -l info
restart: on-failure
env_file:
- .env
volumes:
- .:/app
- ./makedoc/tempdoc:/app/makedoc/tempdoc
depends_on:
- db
- rabbitmq
networks:
- melnichanka
redis:
image: redis:7.2.5-alpine
hostname: redis
ports:
- "6379:6379"
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
command: redis-server /usr/local/etc/redis/redis.conf
networks:
- melnichanka
networks:
melnichanka:
volumes:
static_volume:
postgres_data:
rabbitmq_data: