-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (42 loc) · 1.26 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
version: "3"
services:
certbot:
image: certbot/certbot
container_name: nginx-certbot
volumes:
- ./dockerdata/certbot/conf:/etc/letsencrypt
- ./dockerdata/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
restart: always
nginx:
build:
context: .
dockerfile: ./docker/nginx-alpine/Dockerfile
container_name: nginx
ports:
- "80:80"
- "443:443"
environment:
- NGINX_HOST=$BASE_HOSTNAME
# set environment variable in override from # to empty to activate
- BASEAUTH=#
- PORTFOLIO=#
- SHOWROOM=#
# set this in override to e.g. /portfolio if the / path should redirect to that
- INDEX_REDIRECT=/
volumes:
- ./templates:/etc/nginx/templates
- ./conf.d/includes:/etc/nginx/i
- ./logs:/var/log/nginx
- ./dockerdata/certbot/conf:/etc/letsencrypt
- ./dockerdata/certbot/www:/var/www/certbot
- ./bs:/base-static
restart: always
nginx-cron:
image: paradoxon/alpine-cron
container_name: nginx-cron
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./docker/cron/crontab:/tmp/crontab
network_mode: "none"
restart: always