-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
94 lines (88 loc) · 1.89 KB
/
docker-compose.yaml
File metadata and controls
94 lines (88 loc) · 1.89 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
84
85
86
87
88
89
90
91
92
93
94
services:
library:
build:
context: .
env_file:
- .env
volumes:
- ./:/app
ports:
- "8000:8000"
command: >
sh -c "python manage.py wait_for_db &&
python manage.py makemigrations users &&
python manage.py makemigrations library &&
python manage.py makemigrations payment &&
python manage.py migrate users &&
python manage.py migrate library &&
python manage.py migrate payment &&
python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
develop:
watch:
- action: sync
path: .
target: /app
ignore:
- .venv/
- __pycache__/
- action: rebuild
path: requirements.txt
depends_on:
- db
- redis
db:
image: postgres:16.0-alpine3.17
restart: always
env_file:
- .env
ports:
- "5432:5432"
volumes:
- my_db:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U library_db -d library_db" ]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7
ports:
- "6379:6379"
celery:
build:
context: .
env_file:
- .env
volumes:
- ./:/app
command: sh -c "sleep 5 && celery -A config worker --loglevel=info"
depends_on:
- library
- redis
celery-beat:
build:
context: .
env_file:
- .env
volumes:
- ./:/app
command: celery -A config beat --loglevel=info
depends_on:
- library
- redis
stripe-cli:
image: stripe/stripe-cli:latest
container_name: stripe-cli
ports:
- "12111:12111"
command: listen --forward-to http://library:8000/api/stripe/webhook/
volumes:
- stripe-config:/root/.config/stripe
stdin_open: true
tty: true
depends_on:
- library
volumes:
my_db:
stripe-config: {}