-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-ci.yml
62 lines (58 loc) · 1.38 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
59
60
61
62
version: "3.7"
services:
web:
build:
context: .
dockerfile: Dockerfile
cache_from:
- "${WEB_IMAGE}"
image: "${WEB_IMAGE}"
container_name: web
# restart: always
command: gunicorn dica_project.wsgi:application --timeout 60 --bind 0.0.0.0:8000
# command:
# - /bin/sh
# - -c
# - |
# gunicorn reown_project.wsgi:application --timeout 60 --bind 0.0.0.0:8000
# python manage.py collectstatic --no-input
# python manage.py migrate --no-input
volumes:
- static_volume:/usr/src/app/staticfiles
- media_volume:/usr/src/app/media
# expose:
# - 8000
ports:
- 8000:8000
env_file: .env
networks:
- frontend
nginx:
build:
context: ./prod-nginx
cache_from:
- "${NGINX_IMAGE}"
image: "${NGINX_IMAGE}"
container_name: nginx
restart: always
volumes:
- static_volume:/usr/src/app/staticfiles
- media_volume:/usr/src/app/media
# - ./nginx:/etc/nginx/conf.d
# - /etc/nginx/certs:/etc/nginx/certs
# - /var/run/docker.sock:/tmp/docker.sock:ro
# - /etc/certbot/conf:/etc/letsencrypt
# - /etc/certbot/www:/var/www/certbot
ports:
# - "443:443"
- "80:80"
networks:
- frontend
depends_on:
- web
volumes:
static_volume:
media_volume:
networks:
frontend:
driver: bridge