-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
92 lines (86 loc) · 1.76 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
version: "3.9"
services:
b2b:
build:
context: .
args:
- DEV=true
ports:
- "8000:8000"
volumes:
- ./b2b:/b2b
- dev-static-data:/vol/web
command: >
sh -c "python manage.py wait_for_db &&
python manage.py wait_for_smtp &&
python manage.py migrate &&
python manage.py collectstatic --noinput &&
python manage.py runserver 0.0.0.0:8000"
env_file:
- ./.env
depends_on:
- db
- smtp4dev
- redis
smtp4dev:
image: rnwood/smtp4dev
ports:
- "3001:80"
- "2525:25"
volumes:
- smtp4dev-data:/smtp4dev
db:
image: postgres:13-alpine
ports:
- 6432:5432
volumes:
- dev-db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=devdb
- POSTGRES_USER=devuser
- POSTGRES_PASSWORD=changeme
redis:
image: redis:7.0.9-alpine
ports:
- "6379:6379"
volumes:
- dev-redis-data:/bitnami/redis/data
celery:
build:
context: .
args:
- DEV=true
command: >
sh -c "python manage.py wait_for_db &&
python manage.py wait_for_smtp &&
celery -A b2b worker --loglevel=info -E"
depends_on:
- db
- smtp4dev
- redis
volumes:
- ./b2b:/b2b
env_file:
- ./.env
celery-beat:
build:
context: .
args:
- DEV=true
command: >
sh -c "python manage.py wait_for_db &&
python manage.py wait_for_smtp &&
celery -A b2b beat --loglevel=info"
depends_on:
- db
- smtp4dev
- redis
volumes:
- ./b2b:/b2b
env_file:
- ./.env
volumes:
dev-db-data:
dev-static-data:
smtp4dev-data:
dev-redis-data: