forked from rrebase/knboard
-
Notifications
You must be signed in to change notification settings - Fork 51
/
docker-compose.yml
57 lines (52 loc) · 1.42 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
54
55
56
57
version: "3"
services:
django:
build:
context: .
dockerfile: django.Dockerfile
image: knboard_production_django
restart: unless-stopped
volumes:
- "django-static:/app/django-static"
- "media:/app/media"
- "./backend/settings:/app/settings"
env_file:
- .env
depends_on:
- postgres
nginx:
build:
context: .
dockerfile: nginx.Dockerfile
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
image: knboard_production_nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- "django-static:/usr/share/nginx/django-static"
- "media:/usr/share/nginx/html/media"
- "/etc/nginx/nginx.conf:/etc/nginx/nginx.conf"
- "/etc/nginx/proxy.conf:/etc/nginx/proxy.conf"
- "./data/certbot/conf:/etc/letsencrypt"
- "./data/certbot/www:/var/www/certbot"
depends_on:
- django
- postgres
certbot:
image: certbot/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
- "./data/certbot/conf:/etc/letsencrypt"
- "./data/certbot/www:/var/www/certbot"
postgres:
image: postgres:11
restart: unless-stopped
volumes:
- "/var/lib/postgresql/knboard:/var/lib/postgresql/data"
env_file:
- .env
volumes:
media:
django-static: