-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
53 lines (48 loc) · 1.02 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
version: '3.4'
x-build:
&default-build
image: id/api
build:
context: .
args:
- "ID_VERSION=${ID_VERSION}"
environment:
- DJANGO_SECRET_KEY=local
- MEDIA_ROOT=/tmp
services:
postgres:
image: postgres:13-alpine
volumes:
- ".build/data/postgres:/var/lib/postgresql/data"
- ".build/logs/postgres:/var/log"
environment:
POSTGRES_PASSWORD: 'postgres'
queue:
<< : *default-build
restart: always
command: >
sh -c "pip install -r requirements-testing.txt && python manage.py queue"
volumes:
- ./:/id
depends_on:
- postgres
api:
<< : *default-build
restart: always
command: >
sh -c "pip install -r requirements-testing.txt &&
python manage.py runserver 0.0.0.0:8080"
volumes:
- ./:/id
ports:
- "8080:8080"
depends_on:
- postgres
web:
image: nginx:1.17.8-alpine
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
ports:
- "8000:8000"
depends_on:
- api