HTTPS Setup mit Docker, Nginx und Let's Encrypt
This commit is contained in:
35
docker-compose.yaml
Normal file
35
docker-compose.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
build: ./app
|
||||
volumes:
|
||||
- ./app:/usr/share/nginx/html
|
||||
expose:
|
||||
- "80"
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
|
||||
- ./certbot/www:/var/www/certbot
|
||||
- ./certbot/conf:/etc/letsencrypt
|
||||
depends_on:
|
||||
- app
|
||||
restart: always
|
||||
|
||||
certbot:
|
||||
image: certbot/certbot
|
||||
volumes:
|
||||
- ./certbot/www:/var/www/certbot
|
||||
- ./certbot/conf:/etc/letsencrypt
|
||||
entrypoint: >
|
||||
sh -c "trap exit TERM;
|
||||
while :; do
|
||||
certbot renew;
|
||||
sleep 12h & wait $${!};
|
||||
done"
|
||||
Reference in New Issue
Block a user