-
Notifications
You must be signed in to change notification settings - Fork 613
/
docker-compose.yml
59 lines (55 loc) · 1.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
services:
postgres:
image: postgres:15.3-bullseye
ports:
- "5433:5432"
environment:
POSTGRES_USER: pythondotorg
POSTGRES_PASSWORD: pythondotorg
POSTGRES_DB: pythondotorg
POSTGRES_HOST_AUTH_METHOD: trust # never do this in production!
healthcheck:
test: ["CMD", "pg_isready", "-U", "pythondotorg", "-d", "pythondotorg"]
interval: 1s
redis:
image: redis:7-bullseye
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli","ping"]
interval: 1s
static:
command: bin/static
build:
dockerfile: Dockerfile.static
volumes:
- .:/code
web:
build: .
image: pythondotorg:docker-compose
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/code
ports:
- "8000:8000"
environment:
DATABASE_URL: postgresql://pythondotorg:pythondotorg@postgres:5432/pythondotorg
DJANGO_SETTINGS_MODULE: pydotorg.settings.local
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
worker:
image: pythondotorg:docker-compose
command: celery -A pydotorg worker -B -l INFO --scheduler django_celery_beat.schedulers:DatabaseScheduler
volumes:
- .:/code
environment:
DATABASE_URL: postgresql://pythondotorg:pythondotorg@postgres:5432/pythondotorg
DJANGO_SETTINGS_MODULE: pydotorg.settings.local
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy