made a lot of changes to accomodate running the same app for differnt projects.

This commit is contained in:
2020-04-24 10:43:33 -07:00
parent 206ed58eb9
commit 27e3c4e614
36 changed files with 897 additions and 121 deletions
+4 -5
View File
@@ -8,7 +8,7 @@
version: '3.3'
networks:
${NETWORK_NAME}:
web:
driver: bridge
services:
@@ -16,7 +16,6 @@ services:
traefik:
# https://hub.docker.com/_/traefik
image: "traefik:${TRAEFIK_V}"
container_name: "traefik"
restart: unless-stopped
command:
- --entrypoints.web.address=:80
@@ -29,15 +28,15 @@ services:
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
networks:
- ${NETWORK_NAME}
- web
labels:
# Dashboard
- "traefik.http.routers.traefik.rule=Host(`${DOMAIN_NAME}`)"
- "traefik.http.routers.traefik.rule=Host(`${TRAEFIK_DOMAIN_NAME}`)"
- "traefik.http.routers.traefik.service=api@internal"
- "traefik.http.routers.traefik.tls.certresolver=leresolver"
- "traefik.http.routers.traefik.entrypoints=websecure"
- "traefik.http.routers.traefik.middlewares=authtraefik"
- "traefik.http.middlewares.authtraefik.basicauth.users=${TRAEFIK_USER}:${TRAEFIK_PASS}"
- "traefik.http.middlewares.authtraefik.basicauth.users=<USER>:<PASSWORD>"
# global redirect to https
- "traefik.http.routers.http-catchall.rule=hostregexp(`{host:.+}`)"
- "traefik.http.routers.http-catchall.entrypoints=web"
+1 -4
View File
@@ -1,6 +1,6 @@
# Domains & Project
PREFIX=p1
DOMAIN_NAME=traefik.nickyeoman.com
TRAEFIK_DOMAIN_NAME=traefik.nickyeoman.com
# Passwords
# https://medium.com/@techupbusiness/add-basic-authentication-in-docker-compose-files-with-traefik-34c781234970
@@ -11,6 +11,3 @@ TRAEFIK_PASS=M@keASecureOne
# Software versions
# https://hub.docker.com/_/traefik
TRAEFIK_V=2.2.0
# Network
NETWORK_NAME=traefik_web