-
Notifications
You must be signed in to change notification settings - Fork 0
/
local.yml
77 lines (67 loc) · 1.68 KB
/
local.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
version: "3.3"
services:
redis:
image: "redis"
ports:
- "${REDIS_PORT}:${REDIS_PORT}"
command: redis-server
volumes:
- cache:/data
django: &django
build:
dockerfile: infra/app/Dockerfile
context: .
volumes:
- ./src:/app/src
- ./storage/static:/app/storage/static
- ./storage/media:/app/storage/media
- translations:/app/locale
ports:
- ${DJANGO_HTTP_PORT:-8000}:${DJANGO_HTTP_PORT:-8000}
env_file:
- .env
command: python3 manage.py runserver_plus 0.0.0.0:${DJANGO_HTTP_PORT:-8000}
depends_on:
redis:
condition: service_started
mailpit:
condition: service_started
db_migration:
condition: service_completed_successfully
environment:
- SQL_HOST=db
- REDIS_HOST=redis
db:
image: postgres:16-alpine
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "${SQL_PORT}:${SQL_PORT}"
command: ["postgres", "-c", "log_statement=all", "-p", "${SQL_PORT}"]
environment:
POSTGRES_PASSWORD: ${SQL_PASSWORD}
POSTGRES_USER: ${SQL_USER}
POSTGRES_DB: ${SQL_DATABASE}
db_migration:
<<: *django
command: python manage.py migrate
entrypoint: ["sh", "/app/before_migrate.sh"]
ports: []
depends_on: []
celery-beat:
<<: *django
command: python -m celery -A app beat
ports: []
celery-worker:
<<: *django
command: python -m celery -A app worker -P solo --concurrency 1 --events -l ${CELERY_WORKER_LOGGING_LEVEL:-INFO}
ports: []
mailpit:
image: axllent/mailpit:v1.8
ports:
- "8025:8025"
volumes:
postgres_data:
mediafiles:
cache:
translations: