-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
68 lines (64 loc) · 1.68 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
68 lines (64 loc) · 1.68 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
services:
postgres:
image: docker.io/library/postgres:17
environment:
POSTGRES_DB: danbyte
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
redis:
image: docker.io/library/redis:7
ports:
- "6379:6379"
backend:
build: .
# Migrate + idempotent first-run bootstrap (default Organization, built-in
# statuses, optional superuser) before serving, so a fresh box comes up
# usable with no manual steps. All three are safe to re-run on every boot.
command: >
sh -c "python manage.py migrate --noinput &&
python manage.py bootstrap &&
python manage.py runserver 0.0.0.0:8000"
ports:
- "8000:8000"
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: danbyte
DB_USER: postgres
DB_PASSWORD: postgres
REDIS_URL: redis://redis:6379/0
REDIS_HOST: redis
REDIS_PORT: 6379
DEBUG: "True"
# Set these to have `bootstrap` create the first admin automatically.
# DJANGO_SUPERUSER_USERNAME: admin
# DJANGO_SUPERUSER_PASSWORD: change-me
# DJANGO_SUPERUSER_EMAIL: admin@example.com
depends_on:
- postgres
- redis
volumes:
- .:/app
workers:
build: .
command: python manage.py rqworker default high low
environment:
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: danbyte
DB_USER: postgres
DB_PASSWORD: postgres
REDIS_URL: redis://redis:6379/0
REDIS_HOST: redis
REDIS_PORT: 6379
depends_on:
- postgres
- redis
volumes:
- .:/app
volumes:
postgres_data: