Added docker-compose and config files

This commit is contained in:
2022-04-04 16:38:08 +02:00
parent 00e27ba776
commit ab28346c6f
8 changed files with 188 additions and 0 deletions

0
deploy/base/acme.json Normal file
View File

View File

@@ -0,0 +1,38 @@
version: '3'
services:
traefik:
image: traefik
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${PWD}/traefik.toml:/etc/traefik/traefik.toml
- ${PWD}/traefik-dynamic.toml:/etc/traefik/traefik-dynamic.toml
- ${PWD}/acme.json:/etc/traefik/acme.json
- ${PWD}/access.log:/etc/traefik/access.log
portainer:
image: portainer/portainer-ce
labels:
traefik.enable: true
traefik.http.routers.portainer.rule: Host(`gruppe1.testsites.info`) && PathPrefix(`/portainer`)
traefik.http.routers.portainer.priority: 50
traefik.http.services.portainer.loadbalancer.server.port: 9000
traefik.http.routers.portainer.middlewares: strip_portainer,secHeaders@file
traefik.http.routers.portainer.tls: true
traefik.http.routers.portainer.tls.certresolver: myresolver
traefik.http.middlewares.strip_portainer.stripprefix.prefixes: /portainer
volumes:
- portainer_data:/data
- /var/run/docker.sock:/var/run/docker.sock
networks:
default:
external:
name: net
volumes:
portainer_data:

View File

@@ -0,0 +1,22 @@
[tls.options]
[tls.options.default]
minVersion = "VersionTLS12"
cipherSuites = [
"TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
"TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305",
"TLS_AES_128_GCM_SHA256",
"TLS_AES_256_GCM_SHA384",
"TLS_CHACHA20_POLY1305_SHA256"
]
curvePreferences = [ "CurveP521", "CurveP384" ]
sniStrict = true
[http.middlewares.secHeaders.headers]
browserXssFilter = true
contentTypeNosniff = true
frameDeny = true
stsIncludeSubdomains = true
stsPreload = true
stsSeconds = 31_536_000
customFrameOptionsValue = "SAMEORIGIN"

44
deploy/base/traefik.toml Normal file
View File

@@ -0,0 +1,44 @@
[log]
level = "INFO"
[accessLog]
filePath = "/etc/traefik/access.log"
[entryPoints]
[entryPoints.web]
address = ":80"
[entryPoints.web.forwardedHeaders]
insecure = true
[entryPoints.web.http]
[entryPoints.web.http.redirections]
[entryPoints.web.http.redirections.entryPoint]
to = "web-secure"
scheme = "https"
[entryPoints.web-secure]
address = ":443"
[entryPoints.web-secure.forwardedHeaders]
insecure = true
[entryPoints.websecure.http]
middlewares = ["secHeaders@file"]
[api]
dashboard = true
insecure = true
[providers.docker]
watch = true
exposedByDefault = false
[providers.file]
filename = "/etc/traefik/traefik-dynamic.toml"
[certificatesResolvers.myresolver.acme]
email = "inf20155@lehre.dhbw-stuttgart.de"
storage = "/etc/traefik/acme.json"
[certificatesResolvers.myresolver.acme.httpChallenge]
entryPoint = "web"