bunkerweb/examples/certbot-wildcard/docker-compose.yml

45 lines
1.2 KiB
YAML

version: '3'
services:
mywww:
image: bunkerity/bunkerized-nginx
restart: always
depends_on:
- myapp1
- myapp2
ports:
- 80:8080
- 443:8443
# bunkerized-nginx runs as an unprivileged user with UID/GID 101
# don't forget to edit the permissions of the files and folders accordingly
volumes:
- ./web-files:/www:ro
- ./letsencrypt:/letsencrypt:ro
environment:
- SERVER_NAME=app1.example.com app2.example.com # replace with your domains
- MULTISITE=yes
- USE_CUSTOM_HTTPS=yes
- CUSTOM_HTTPS_CERT=/letsencrypt/live/example.com/fullchain.pem
- CUSTOM_HTTPS_KEY=/letsencrypt/live/example.com/privkey.pem
- REDIRECT_HTTP_TO_HTTPS=yes
- DISABLE_DEFAULT_SERVER=yes
- USE_CLIENT_CACHE=yes
- USE_GZIP=yes
- app1.example.com_REMOTE_PHP=myapp1
- app1.example.com_REMOTE_PHP_PATH=/app
- app2.example.com_REMOTE_PHP=myapp2
- app2.example.com_REMOTE_PHP_PATH=/app
myapp1:
image: php:fpm
restart: always
volumes:
- ./web-files/app1.example.com:/app
myapp2:
image: php:fpm
restart: always
volumes:
- ./web-files/app2.example.com:/app