-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
107 lines (100 loc) · 2.4 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
services:
django:
build: .
image: blasphemy_django
container_name: blasphemy_django
volumes:
- .:/code
env_file: .env
environment:
# The default value is "xterm" and limits available color palette
# https://stackoverflow.com/questions/10003136/what-is-the-difference-between-xterm-color-xterm-256color
- TERM=xterm-256color
working_dir: /code/src
command: python manage.py runserver 0:8000
ports:
- "${DJANGO_HOST_FORWARD_PORT:-8000}:8000"
stdin_open: true
tty: true
depends_on:
- db
- mailpit
- redis
db:
env_file: .env
image: postgres:16.4-alpine3.20
container_name: blasphemy_postgres
environment:
POSTGRES_DB: ${POSTGRES_DB_NAME}
POSTGRES_USER: ${POSTGRES_DB_USER}
POSTGRES_PASSWORD: ${POSTGRES_DB_PASSWORD}
PGPORT: ${POSTGRES_DB_PORT}
ports:
- "${POSTGRES_HOST_FORWARD_PORT}:${POSTGRES_DB_PORT}"
volumes:
- dbdata:/var/lib/postgresql/data
mailpit:
image: axllent/mailpit:v1.21.0
container_name: blasphemy_mailpit
ports:
- "8025:8025"
- "1025:1025"
restart: unless-stopped
volumes:
- mailpit-data:/data
redis:
env_file: .env
image: redis:7.4.1-alpine3.20
container_name: blasphemy_redis
ports:
# TODO: Check if internal port is configurable
- "${REDIS_PORT:-6379}:${REDIS_PORT:-6379}"
volumes:
- redis-data:/data
celery_workers:
build: .
image: blasphemy_celery_workers
container_name: blasphemy_celery_workers
volumes:
- .:/code
env_file: .env
working_dir: /code/src
command: celery -A core.celery worker -E -l info
depends_on:
- db
- redis
stdin_open: true
tty: true
celery_beat:
build: .
image: blasphemy_celery_beat
container_name: blasphemy_celery_beat
volumes:
- .:/code
env_file: .env
working_dir: /code/src
command: celery -A core.celery beat -l info
depends_on:
- db
- redis
stdin_open: true
tty: true
celery_flower:
build: .
image: blasphemy_celery_flower
volumes:
- .:/code
env_file: .env
working_dir: /code/src
command: celery --broker=redis://redis:6379/0 flower --port=5555
ports:
- "5555:5555"
depends_on:
- redis
volumes:
dbdata:
driver: local
mailpit-data:
driver: local
redis-data:
driver: local