-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
54 lines (51 loc) · 1.21 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
version: "3.11"
services:
postgres:
image: postgres:14-bullseye
restart: always
ports:
- "5433:5432"
environment:
POSTGRES_USER: pugpe
POSTGRES_PASSWORD: pugpe
POSTGRES_DB: pugpe
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test: ["CMD", "pg_isready", "-U", "pugpe", "-d", "pugpe"]
interval: 1s
redis:
image: redis:7-bullseye
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli","ping"]
interval: 1s
web:
build: .
image: pugpe:web
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
environment:
DATABASE_URL: postgresql://pugpe:pugpe@postgres:5432/pugpe
DJANGO_READ_DOT_ENV_FILE: "True"
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
worker:
image: pugpe:web
command: celery -A pugpe worker --beat -l INFO
volumes:
- .:/code
environment:
DATABASE_URL: postgresql://pugpe:pugpe@postgres:5432/pugpe
DJANGO_READ_DOT_ENV_FILE: "True"
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy