-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
85 lines (82 loc) · 3.94 KB
/
docker-compose.yml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
version: "3.3"
services:
#########################
# Traefik reverse proxy #
#########################
traefik.rproxy:
image: "traefik:latest"
container_name: traefik.rproxy
restart: always
hostname: traefik.rproxy
################################################################################################
# Exposed ports to the host so traefik container can listen to these ports on the host machine #
################################################################################################
ports:
- "80:80" # Web
- "443:443" # Web-Secure
- "853:853" #DNS over TLS
###############################################################
# All volumes which are mounted locally to the traefik folder #
###############################################################
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
##############################################
# This is to save my ssl certifcates locally #
##############################################
- "./traefik-ssl-certs:/ssl-certs"
######################################
# mountpoint for traefik access logs #
######################################
- "./logs/:/var/log/traefik/"
#################################
# This is for my dynamic config #
#################################
- "./configurations/:/configurations"
########################################
# This is for my traefik static config #
########################################
- "./configurations/:/etc/traefik/"
networks:
- web
- web-secure
- monitoring-stack
labels:
- "traefik.enable=true"
####################################################################################
# this is a domain name i have pointed to my home address via no-ip. #
# you can create a no-ip account, and set it up so you have an dynamic DNS address #
# In your domain you create a new CNAME record for your website #
# After that you point that CNAME record to the dynamic DNS record #
####################################################################################
- "traefik.http.routers.traefik-secure.rule=Host(${url})"
##################################################################################
# This is my certresolved named: production and can be found in my static config #
##################################################################################
- "traefik.http.routers.traefik-secure.tls.certresolver=production"
- "traefik.http.routers.traefik-secure.tls=true"
################################
# Port to traefik dashboard UI #
################################
- "traefik.http.services.traefik-secure.loadbalancer.server.port=${port}" #port to the webservice
#####################################################
# I have created a docker network named: web-secure #
#####################################################
- "traefik.http.routers.traefik-secure.entrypoints=web-secure"
###################
# Traefik service #
###################
- "traefik.http.routers.traefik-secure.service=api@internal"
#####################################################################################################
# Use this only if you have Authelia deployed in your infra, and is reachable via an docker network #
#####################################################################################################
- "traefik.http.routers.traefik-secure.middlewares=authelia-secure@docker"
#####################################################
# Persisting of my docker network within this stack #
#####################################################
networks:
web-secure:
external: true
web:
external: true
monitoring-stack:
external: true