mirror of
https://github.com/nextcloud/docker.git
synced 2024-11-18 11:06:43 +01:00
2d7258086e
Signed-off-by: Ismail Yenigul <ismailyenigul@gmail.com>
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
|
|
# 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
|