-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.ci.yml
58 lines (54 loc) · 1.59 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
53
54
55
56
57
58
version: "3.7"
services:
portfolio:
build:
context: .
dockerfile: Dockerfile.do.prod
cache_from:
- "${WEB_IMAGE}"
image: "${WEB_IMAGE}"
command: gunicorn portfolio_project:application --bind 0.0.0.0:8000
volumes:
- static_volume:/usr/src/app/staticfiles
- media_volume:/usr/src/app/media
expose:
- 8000
env_file:
- .env # created in Dockerfile.do.prod (echo) and 'scp'-ed
nginx-proxy:
container_name: nginx-proxy
build:
context: ./nginx
cache_from:
- "${NGINX_IMAGE}"
image: "${NGINX_IMAGE}"
restart: always
volumes:
- static_volume:/usr/src/app/staticfiles
- media_volume:/usr/src/app/media
- certs:/etc/nginx/certs
- html:/usr/share/nginx/html
- vhost:/etc/nginx/vhost.d
- /var/run/docker.sock:/tmp/docker.sock:ro
ports:
- 80:80
- 443:443
depends_on:
- portfolio
nginx-proxy-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- certs:/etc/nginx/certs
- html:/usr/share/nginx/html
- vhost:/etc/nginx/vhost.d
env_file:
- .env.companion # created in Dockerfile.do.prod and 'scp'-ed
depends_on:
- nginx-proxy
volumes:
static_volume:
media_volume:
certs:
html:
vhost: