0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2024-11-18 19:16:42 +01:00
nextcloud-docker/.examples/docker-compose/with-traefik2-postgresql-redis-multi-network/traefik2/docker-compose.yml

48 lines
1.3 KiB
YAML
Raw Normal View History

# Create network first
# docker network create --driver=bridge --attachable --internal=false traefik
#NOTES:
#1. certificatesresolvers.myresolver.acme.email=myemail@gmail.com
# cat docker-compose.yml
version: '3.3'
volumes:
letsencrypt:
driver: local
services:
traefik:
image: traefik:v2.2
container_name: traefik
restart: always
command:
- "--log.level=DEBUG"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.network=traefik"
- "--providers.docker.exposedbydefault=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.http.redirections.entryPoint.to=websecure"
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
- "--certificatesresolvers.myresolver.acme.httpchallenge=true"
- "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web"
- "--certificatesresolvers.myresolver.acme.email=myemail@gmail.com"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- 80:80
- 443:443
networks:
- default
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- letsencrypt:/letsencrypt
networks:
default:
external:
name: traefik