summaryrefslogtreecommitdiff
path: root/docker-compose.yml
blob: fe056c6ac7afed36f1e4c59afed20da94fa1b082 (plain)
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
on: '3'    
 services:    
   nginx:    
     image: nginx:1.15-alpine    
     ports:    
       - "80:80"    
       - "443:443"    
     volumes:    
       - ./data/nginx:/etc/nginx/conf.d    
       - ./data/certbot/conf:/etc/letsencrypt    
       - ./data/certbot/www:/var/www/certbot    
     command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"    
     restart: always    
   certbot:    
     image: certbot/certbot    
     volumes:    
        - ./data/certbot/conf:/etc/letsencrypt    
        - ./data/certbot/www:/var/www/certbot    
     entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"    
     restart: always    
     
 networks:    
   default:    
     external:    
       name: frontend