Updated all containers to bring inline with needed Traefik config

This commit is contained in:
Luke Else 2023-08-07 23:01:29 +01:00
parent 97b4dc6a66
commit 7a553128b1
5 changed files with 30 additions and 46 deletions

View File

@ -9,19 +9,18 @@ services:
volumes: volumes:
- ./bitwarden/:/data/ - ./bitwarden/:/data/
networks: networks:
- bitwarden - proxy
depends_on:
- traefik
labels: labels:
## Expose Bitwarden Through Trefik ## ## Expose Bitwarden Through Trefik ##
- "traefik.enable=true" # <== Enable traefik to proxy this container - "traefik.enable=true" # <== Enable traefik to proxy this container
- "traefik.http.services.bitwarden.loadbalancer.server.port=80"
- "traefik.http.routers.bitwarden.rule=Host(`bitwarden.luke-else.co.uk`) || Host(`www.bitwarden.luke-else.co.uk`)" - "traefik.http.routers.bitwarden.rule=Host(`bitwarden.luke-else.co.uk`) || Host(`www.bitwarden.luke-else.co.uk`)"
- "traefik.http.routers.bitwarden.entrypoints=http" - "traefik.http.routers.bitwarden.entrypoints=websecure"
- "traefik.http.routers.bitwarden.middlewares=redirect@file" - "traefik.http.routers.bitwarden.tls.certresolver=myresolver"
- "traefik.http.routers.bitwarden-secured.rule=Host(`bitwarden.luke-else.co.uk`) || Host(`www.bitwarden.luke-else.co.uk`)"
- "traefik.http.routers.bitwarden-secured.entrypoints=https"
- "traefik.http.routers.bitwarden-secured.tls.certresolver=mytlschallenge"
restart: unless-stopped restart: unless-stopped
networks: networks:
bitwarden: proxy:
external: true external: true

View File

@ -8,8 +8,6 @@ services:
container_name: mongoDB container_name: mongoDB
volumes: volumes:
- ./mongo/:/data/db - ./mongo/:/data/db
networks:
- backend
ports: ports:
- "27017:27017" - "27017:27017"
environment: environment:
@ -23,12 +21,8 @@ services:
container_name: MySQL container_name: MySQL
volumes: volumes:
- ./mysql/:/var/lib/mysql - ./mysql/:/var/lib/mysql
networks:
- backend
ports: ports:
- "3306:3306" - "3306:3306"
depends_on:
- traefik
environment: environment:
MYSQL_ROOT_PASSWORD: rootpassword MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: test_db MYSQL_DATABASE: test_db
@ -38,7 +32,7 @@ services:
image: "phpmyadmin/phpmyadmin:latest" image: "phpmyadmin/phpmyadmin:latest"
container_name: phpMyAdmin container_name: phpMyAdmin
networks: networks:
- backend - proxy
depends_on: depends_on:
- mysql - mysql
- traefik - traefik
@ -47,15 +41,12 @@ services:
labels: labels:
## Expose phpMyAdmin Through Trefik ## ## Expose phpMyAdmin Through Trefik ##
- "traefik.enable=true" # <== Enable traefik to proxy this container - "traefik.enable=true" # <== Enable traefik to proxy this container
- "traefik.http.routers.phpMyAdmin.rule=Host(`mysql.luke-else.co.uk`) || Host(`www.mysql.luke-else.co.uk`)" - "traefik.http.services.phpmyadmin.loadbalancer.server.port=80"
- "traefik.http.routers.phpMyAdmin.entrypoints=http" - "traefik.http.routers.phpmyadmin.rule=Host(`mysql.luke-else.co.uk`) || Host(`www.mysql.luke-else.co.uk`)"
- "traefik.http.routers.phpMyAdmin.middlewares=redirect@file" - "traefik.http.routers.phpmyadmin.entrypoints=websecure"
- "traefik.http.routers.phpmyadmin.tls.certresolver=myresolver"
- "traefik.http.routers.phpMyAdmin-secured.rule=Host(`mysql.luke-else.co.uk`) || Host(`www.mysql.luke-else.co.uk`)"
- "traefik.http.routers.phpMyAdmin-secured.entrypoints=https"
- "traefik.http.routers.phpMyAdmin-secured.tls.certresolver=mytlschallenge"
restart: unless-stopped restart: unless-stopped
networks: networks:
backend: proxy:
external: true external: true

View File

@ -11,6 +11,8 @@ services:
- /etc/localtime:/etc/localtime:ro - /etc/localtime:/etc/localtime:ro
networks: networks:
- proxy - proxy
depends_on:
- traefik
ports: ports:
- "222:22" - "222:22"
environment: environment:
@ -30,7 +32,7 @@ services:
## Expose Gitea Through Trefik ## ## Expose Gitea Through Trefik ##
- "traefik.enable=true" # <== Enable traefik to proxy this container - "traefik.enable=true" # <== Enable traefik to proxy this container
- "traefik.http.services.gitea.loadbalancer.server.port=3000" - "traefik.http.services.gitea.loadbalancer.server.port=3000"
- "traefik.http.routers.gitea.rule=Host(`test.luke-else.co.uk`)" - "traefik.http.routers.gitea.rule=Host(`test.luke-else.co.uk`) || Host(`www.test.luke-else.co.uk`)"
- "traefik.http.routers.gitea.entrypoints=websecure" - "traefik.http.routers.gitea.entrypoints=websecure"
- "traefik.http.routers.gitea.tls.certresolver=myresolver" - "traefik.http.routers.gitea.tls.certresolver=myresolver"
restart: unless-stopped restart: unless-stopped

View File

@ -10,10 +10,11 @@ services:
volumes: volumes:
- ./nextcloud:/var/www/html - ./nextcloud:/var/www/html
networks: networks:
- services - proxy
- nextcloud - nextcloud
depends_on: depends_on:
- db - db
- traefik
environment: environment:
- MYSQL_USER=nextcloud - MYSQL_USER=nextcloud
- MYSQL_PASSWORD= - MYSQL_PASSWORD=
@ -22,13 +23,10 @@ services:
labels: labels:
## Expose Nextcloud Through Trefik ## ## Expose Nextcloud Through Trefik ##
- "traefik.enable=true" # <== Enable traefik to proxy this container - "traefik.enable=true" # <== Enable traefik to proxy this container
- "traefik.http.services.nextcloud.loadbalancer.server.port=80"
- "traefik.http.routers.nextcloud.rule=Host(`nextcloud.luke-else.co.uk`) || Host(`www.nextcloud.luke-else.co.uk`)" - "traefik.http.routers.nextcloud.rule=Host(`nextcloud.luke-else.co.uk`) || Host(`www.nextcloud.luke-else.co.uk`)"
- "traefik.http.routers.nextcloud.entrypoints=http" - "traefik.http.routers.nextcloud.entrypoints=websecure"
- "traefik.http.routers.nextcloud.middlewares=redirect@file" - "traefik.http.routers.nextcloud.tls.certresolver=myresolver"
- "traefik.http.routers.nextcloud-secured.rule=Host(`nextcloud.luke-else.co.uk`) || Host(`www.nextcloud.luke-else.co.uk`)"
- "traefik.http.routers.nextcloud-secured.entrypoints=https"
- "traefik.http.routers.nextcloud-secured.tls.certresolver=mytlschallenge"
restart: unless-stopped restart: unless-stopped
db: db:
@ -47,7 +45,7 @@ services:
restart: unless-stopped restart: unless-stopped
networks: networks:
services: proxy:
external: true external: true
nextcloud: nextcloud:
name: nextcloud name: nextcloud

View File

@ -11,13 +11,10 @@ services:
labels: labels:
## Expose luke-else Through Trefik ## ## Expose luke-else Through Trefik ##
- "traefik.enable=true" # <== Enable traefik to proxy this container - "traefik.enable=true" # <== Enable traefik to proxy this container
- "traefik.http.routers.luke-else.rule=Host(`luke-else.co.uk`) || Host(`www.luke-else.co.uk`)" - "traefik.http.services.personal.loadbalancer.server.port=80"
- "traefik.http.routers.luke-else.entrypoints=http" - "traefik.http.routers.personal.rule=Host(`luke-else.co.uk`) || Host(`www.luke-else.co.uk`)"
- "traefik.http.routers.luke-else.middlewares=redirect@file" - "traefik.http.routers.personal.entrypoints=websecure"
- "traefik.http.routers.personal.tls.certresolver=myresolver"
- "traefik.http.routers.luke-else-secured.rule=Host(`luke-else.co.uk`) || Host(`www.luke-else.co.uk`)"
- "traefik.http.routers.luke-else-secured.entrypoints=https"
- "traefik.http.routers.luke-else-secured.tls.certresolver=mytlschallenge"
restart: unless-stopped restart: unless-stopped
snexo.co.uk: snexo.co.uk:
@ -28,13 +25,10 @@ services:
labels: labels:
## Expose Snexo Through Trefik ## ## Expose Snexo Through Trefik ##
- "traefik.enable=true" # <== Enable traefik to proxy this container - "traefik.enable=true" # <== Enable traefik to proxy this container
- "traefik.http.routers.snexo.rule=Host(`snexo.luke-else.co.uk`) || Host(`www.snexo.luke-else.co.uk`)" - "traefik.http.services.snexo.loadbalancer.server.port=80"
- "traefik.http.routers.snexo.entrypoints=http" - "traefik.http.routers.snexo.rule=Host(`snexo.co.uk`) || Host(`www.snexo.co.uk`)"
- "traefik.http.routers.snexo.middlewares=redirect@file" - "traefik.http.routers.snexo.entrypoints=websecure"
- "traefik.http.routers.snexo.tls.certresolver=myresolver"
- "traefik.http.routers.snexo-secured.rule=Host(`snexo.luke-else.co.uk`) || Host(`www.snexo.luke-else.co.uk`)"
- "traefik.http.routers.snexo-secured.entrypoints=https"
- "traefik.http.routers.snexo-secured.tls.certresolver=mytlschallenge"
restart: unless-stopped restart: unless-stopped
networks: networks: