-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
60 lines (57 loc) · 2.49 KB
/
compose.yaml
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Copyright (C) 2021-2025 Solution Libre
#
# This file is part of Traefik with Docker Compose.
#
# Traefik with Docker Compose is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Traefik with Docker Compose is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Traefik with Docker Compose. If not, see <https://www.gnu.org/licenses/>.
networks:
web:
external: true
services:
traefik:
environment:
TRAEFIK_TRAEFIK_PROVIDERS_DOCKER: true
TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT: false
TRAEFIK_PROVIDERS_DOCKER_NETWORK: web
TRAEFIK_PROVIDERS_FILE_DIRECTORY: /etc/traefik
TRAEFIK_PROVIDERS_FILE_WATCH: true
TRAEFIK_ENTRYPOINTS_WEB_ADDRESS: :${HTTP_PORT}
TRAEFIK_ENTRYPOINTS_WEB_HTTP_REDIRECTIONS_ENTRYPOINT_TO: websecure
TRAEFIK_ENTRYPOINTS_WEB_HTTP_REDIRECTIONS_ENTRYPOINT_SCHEME: https
TRAEFIK_ENTRYPOINTS_WEBSECURE_ADDRESS: :${HTTPS_PORT}
TRAEFIK_ENTRYPOINTS_WEBSECURE_HTTP_MIDDLEWARES: default@file
TRAEFIK_ENTRYPOINTS_WEBSECURE_HTTP_TLS_DOMAINS: ${DEFAULT_DOMAIN}
TRAEFIK_ENTRYPOINTS_WEBSECURE_HTTP_TLS_OPTIONS: default@file
TRAEFIK_CERTIFICATESRESOLVERS_MYRESOLVER_ACME_DNSCHALLENGE: ${ACME_DNS_CHALLENGE}
TRAEFIK_CERTIFICATESRESOLVERS_MYRESOLVER_ACME_DNSCHALLENGE_PROVIDER: ${ACME_DNS_CHALLENGE_PROVIDER}
TRAEFIK_CERTIFICATESRESOLVERS_MYRESOLVER_ACME_HTTPCHALLENGE: ${ACME_HTTP_CHALLENGE}
TRAEFIK_CERTIFICATESRESOLVERS_MYRESOLVER_ACME_HTTPCHALLENGE_ENTRYPOINT: web
TRAEFIK_CERTIFICATESRESOLVERS_MYRESOLVER_ACME_TLSCHALLENGE: ${ACME_TLS_CHALLENGE}
TRAEFIK_CERTIFICATESRESOLVERS_MYRESOLVER_ACME_EMAIL: ${ACME_EMAIL}
TRAEFIK_CERTIFICATESRESOLVERS_MYRESOLVER_ACME_STORAGE: /letsencrypt/acme.json
env_file: '.env.traefik'
image: traefik:${VERSION}
networks:
- web
ports:
- ${HTTP_PORT}:${HTTP_PORT}
- ${HTTPS_PORT}:${HTTPS_PORT}
# Enable API
#- 8080:8080
restart: always
volumes:
- ./config:/etc/traefik:ro
- letsencrypt:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock:ro
volumes:
letsencrypt: