forked from MehdiMstv/Saku-Backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
49 lines (45 loc) · 987 Bytes
/
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
version: "3"
services:
db:
image: postgres:12-alpine3.15
volumes:
- ./postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=saku-db
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=saku1234
ports:
- "15432:5432"
redis:
image: redis:7.0.2-alpine
command: redis-server
ports:
- "16379:6379"
web:
build: .
tty: true
# command: /bin/sh -c "cd saku && python manage.py test"
command: /bin/sh -c "cd saku && python manage.py migrate && python manage.py runserver 0.0.0.0:8888"
volumes:
- .:/code
ports:
- "8888:8888"
depends_on:
- db
- redis
celery:
restart: always
build:
context: .
command: /bin/sh -c "cd saku && celery -A saku worker -l info"
volumes:
- .:/code
environment:
- DB_HOST=db
- DB_NAME=saku-db
- DB_USER=postgres
- DB_PASS=saku1234
depends_on:
- db
- redis
- web