-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.ci.yml
52 lines (48 loc) · 1.11 KB
/
docker-compose.ci.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
version: '3.7'
services:
web:
build:
context: .
dockerfile: Dockerfile
cache_from:
- "${WEB_IMAGE}"
image: "${WEB_IMAGE}"
command: gunicorn pythondjango.wsgi:application --bind 0.0.0.0:8000
volumes:
- static_volume:/static
expose:
- 8000
environment:
- SECRET_KEY=$${SECRET_KEY}
- DJANGO_ALLOWED_HOSTS=$${DJANGO_ALLOWED_HOSTS}
- DB_ENGINE=$${DB_ENGINE}
- DB_NAME=$${DB_NAME}
- DB_USER=$${DB_USER}
- DB_PASSWORD=$${DB_PASSWORD}
- DB_HOST=$${DB_HOST}
- DB_PORT=$${DB_PORT}
depends_on:
- postgres
postgres:
image: postgres
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=$${POSTGRES_USER}
- POSTGRES_PASSWORD=$${POSTGRES_PASSWORD}
- POSTGRES_DB=$${POSTGRES_DB}
nginx:
build:
context: ./nginx
cache_from:
- "${NGINX_IMAGE}"
image: "${NGINX_IMAGE}"
ports:
- 80:80
volumes:
- static_volume:/static
depends_on:
- web
volumes:
postgres_data:
static_volume: