-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose-dev.yml
More file actions
45 lines (40 loc) · 1017 Bytes
/
docker-compose-dev.yml
File metadata and controls
45 lines (40 loc) · 1017 Bytes
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
services:
web:
build:
context: .
# command: bash -c "python manage.py runserver 0.0.0.0:${WEB_PORT}"
command: daphne -b 0.0.0.0 -p ${WEB_PORT} core.asgi:application
ports:
- "${WEB_PORT}:${WEB_PORT}"
volumes:
- .:/app
depends_on:
- db
- redis
environment:
- DJANGO_SETTINGS_MODULE=core.settings
- PYTHONUNBUFFERED=1
db:
image: postgres:16.2
volumes:
- django_auth_db:/var/lib/postgresql/data
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB_HOST=${POSTGRES_HOST}
- POSTGRES_PORT=${POSTGRES_PORT}
redis:
image: redis:alpine
worker_default:
restart: unless-stopped
build:
context: .
command: celery -A core worker --loglevel=info --queues=default --concurrency=2 # 2 workers for default
volumes:
- .:/app
depends_on:
- web
- redis
volumes:
django_auth_db: