forked from I-fong/FFfusion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
47 lines (42 loc) · 1.32 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
# docker-compose.yml
version: '3'
services:
nginx:
container_name: nginx
build: ./nginx
image: docker-server/nginx
restart: always
ports:
- '80:80'
- '443:443'
volumes:
- ./server:/srv/docker-server
- ./log:/var/log/nginx
- django_media:/srv/docker-server/media
- django_static:/srv/docker-server/static
- ../certbot/conf:/etc/letsencrypt
- ../certbot/www:/var/www/certbot
depends_on:
- django
command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
certbot:
container_name: certbot
image: certbot/certbot
volumes:
- ../certbot/conf:/etc/letsencrypt
- ../certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
django:
container_name: django
build: ./server
image: docker-server/django
restart: always
command: uwsgi --ini uwsgi.ini
volumes:
- ./server:/srv/docker-server
- ./log:/var/log/uwsgi
- django_media:/srv/docker-server/media
- django_static:/srv/docker-server/static
volumes:
django_media:
django_static: