-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
83 lines (77 loc) · 2.03 KB
/
docker-compose.yaml
File metadata and controls
83 lines (77 loc) · 2.03 KB
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
services:
postgres:
container_name: postgres
image: postgres:14.8
environment:
POSTGRES_USER: postgres_user
POSTGRES_PASSWORD: postgres_password
POSTGRES_DB: postgres_db
volumes:
- postgres_data:/var/lib/postgresql/data
backend:
container_name: backend
build:
context: ./
env_file:
- ./.env
environment:
DJ_SETTINGS__SECRET_KEY: empty
POSTGRES_DSN: postgres://postgres_user:postgres_password@postgres:5432/postgres_db
REDIS_URL: redis://redis:6379/0
DJ_SETTINGS__DEBUG: 'true'
DJ_SETTINGS__ENABLE_MEDIA_FILES_SERVING: 'true'
GUNICORN_CMD_ARGS: '--reload --workers 2'
DJANGO_SUPERUSER_USERNAME: 'admin'
DJANGO_SUPERUSER_LAST_NAME: 'Админский'
DJANGO_SUPERUSER_FIRST_NAME: 'Пользователь'
DJANGO_SUPERUSER_PASSWORD: 'admin123'
DJANGO_SUPERUSER_EMAIL: '[email protected]'
ports:
- 127.0.0.1:8000:80
volumes:
- ./media:/media/
- ./src/:/opt/app/src
- ./pyproject.toml:/opt/pyproject.toml
- ./uv.lock:/opt/uv.lock
depends_on:
- postgres
redis:
image: redis:7.4-bookworm
restart: always
ports:
- 6379:6379
celery:
restart: always
build:
context: ./
env_file:
- ./.env
environment:
DJ_SETTINGS__SECRET_KEY: empty
POSTGRES_DSN: postgres://postgres_user:postgres_password@postgres:5432/postgres_db
REDIS_URL: redis://redis:6379/0
volumes:
- ./src/:/opt/app/src
depends_on:
- redis
- backend
command: 'celery -A webapp worker -l info'
celery-beat:
restart: always
build:
context: ./
env_file:
- ./.env
environment:
DJ_SETTINGS__SECRET_KEY: empty
POSTGRES_DSN: postgres://postgres_user:postgres_password@postgres:5432/postgres_db
REDIS_URL: redis://redis:6379/0
volumes:
- ./src/:/opt/app/src
depends_on:
- redis
- celery
- postgres
command: 'celery -A webapp beat -l info'
volumes:
postgres_data: