Compare commits
4 Commits
519335d856
...
ff110c77ee
| Author | SHA1 | Date | |
|---|---|---|---|
| ff110c77ee | |||
| 9c283409d8 | |||
| 5d1de4bc4e | |||
| fd9a34e273 |
+31
@@ -0,0 +1,31 @@
|
|||||||
|
# Environment files with credentials
|
||||||
|
.env
|
||||||
|
.env.local
|
||||||
|
.env.*.local
|
||||||
|
|
||||||
|
# Database files
|
||||||
|
*.sqlite3
|
||||||
|
*.db
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log
|
||||||
|
logs/
|
||||||
|
|
||||||
|
# Dependencies
|
||||||
|
node_modules/
|
||||||
|
venv/
|
||||||
|
env/
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
*.swp
|
||||||
|
*.swo
|
||||||
|
*~
|
||||||
|
|
||||||
|
# Letsencrypt
|
||||||
|
letsencrypt/
|
||||||
@@ -5,7 +5,7 @@ networks:
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
authelia:
|
authelia:
|
||||||
image: authelia/authelia:latest
|
image: authelia/authelia:4.37.5
|
||||||
container_name: authelia
|
container_name: authelia
|
||||||
volumes:
|
volumes:
|
||||||
- ./config:/config
|
- ./config:/config
|
||||||
@@ -14,6 +14,19 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- TZ=UTC
|
- TZ=UTC
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:9091/api/health"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 40s
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 512M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.25'
|
||||||
|
memory: 256M
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
# The URL where you will actually log in
|
# The URL where you will actually log in
|
||||||
@@ -21,8 +34,6 @@ services:
|
|||||||
- "traefik.http.routers.authelia.entrypoints=websecure"
|
- "traefik.http.routers.authelia.entrypoints=websecure"
|
||||||
- "traefik.http.routers.authelia.tls.certresolver=myresolver"
|
- "traefik.http.routers.authelia.tls.certresolver=myresolver"
|
||||||
- "traefik.http.services.authelia.loadbalancer.server.port=9091"
|
- "traefik.http.services.authelia.loadbalancer.server.port=9091"
|
||||||
|
|
||||||
# --- ADD THESE THREE LINES BELOW ---
|
|
||||||
- "traefik.http.middlewares.authelia-auth.forwardauth.address=http://authelia:9091/api/verify?rd=https://auth.quangkhai.ch/"
|
- "traefik.http.middlewares.authelia-auth.forwardauth.address=http://authelia:9091/api/verify?rd=https://auth.quangkhai.ch/"
|
||||||
- "traefik.http.middlewares.authelia-auth.forwardauth.trustForwardHeader=true"
|
- "traefik.http.middlewares.authelia-auth.forwardauth.trustForwardHeader=true"
|
||||||
- "traefik.http.middlewares.authelia-auth.forwardauth.authResponseHeaders=Remote-User,Remote-Groups,Remote-Name,Remote-Email"
|
- "traefik.http.middlewares.authelia-auth.forwardauth.authResponseHeaders=Remote-User,Remote-Groups,Remote-Name,Remote-Email"
|
||||||
|
|||||||
@@ -18,17 +18,26 @@ services:
|
|||||||
image: pdreker/fritz_exporter:2
|
image: pdreker/fritz_exporter:2
|
||||||
container_name: fritz-exporter
|
container_name: fritz-exporter
|
||||||
restart: always
|
restart: always
|
||||||
|
env_file:
|
||||||
|
- ./.env
|
||||||
environment:
|
environment:
|
||||||
FRITZ_HOSTNAME: '192.168.178.1'
|
FRITZ_HOSTNAME: '${FRITZ_HOSTNAME}'
|
||||||
FRITZ_USERNAME: 'fritz9297'
|
FRITZ_USERNAME: '${FRITZ_USERNAME}'
|
||||||
FRITZ_PASSWORD: 'VeNuocNuocVe26!'
|
FRITZ_PASSWORD: '${FRITZ_PASSWORD}'
|
||||||
ports:
|
ports:
|
||||||
- "9787:9787"
|
- "9787:9787"
|
||||||
networks:
|
networks:
|
||||||
- back-tier
|
- back-tier
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.2'
|
||||||
|
memory: 128M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.1'
|
||||||
|
memory: 64M
|
||||||
|
|
||||||
prometheus:
|
prometheus:
|
||||||
image: prom/prometheus:latest
|
image: prom/prometheus:v2.54.0
|
||||||
volumes:
|
volumes:
|
||||||
- ./prometheus/:/etc/prometheus/
|
- ./prometheus/:/etc/prometheus/
|
||||||
- prometheus_data:/prometheus
|
- prometheus_data:/prometheus
|
||||||
@@ -44,13 +53,26 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- back-tier
|
- back-tier
|
||||||
restart: always
|
restart: always
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:9090/-/healthy"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 40s
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '1'
|
||||||
|
memory: 1G
|
||||||
|
reservations:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 512M
|
||||||
# deploy:
|
# deploy:
|
||||||
# placement:
|
# placement:
|
||||||
# constraints:
|
# constraints:
|
||||||
# - node.hostname == ${HOSTNAME}
|
# - node.hostname == ${HOSTNAME}
|
||||||
|
|
||||||
grafana:
|
grafana:
|
||||||
image: grafana/grafana
|
image: grafana/grafana:11.0.0
|
||||||
user: "472"
|
user: "472"
|
||||||
depends_on:
|
depends_on:
|
||||||
- prometheus
|
- prometheus
|
||||||
@@ -68,6 +90,19 @@ services:
|
|||||||
- front-tier
|
- front-tier
|
||||||
- proxy_tier
|
- proxy_tier
|
||||||
restart: always
|
restart: always
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/api/health"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 40s
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '1'
|
||||||
|
memory: 512M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.5'
|
||||||
|
memory: 256M
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
# HTTP to HTTPS Redirect
|
# HTTP to HTTPS Redirect
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ services:
|
|||||||
image: traefik:v3.6
|
image: traefik:v3.6
|
||||||
container_name: traefik
|
container_name: traefik
|
||||||
command:
|
command:
|
||||||
#- "--api.dashboard=true"
|
- "--api.dashboard=true"
|
||||||
- "--api.insecure=true"
|
- "--api.insecure=false"
|
||||||
- "--providers.docker=true"
|
- "--providers.docker=true"
|
||||||
- "--providers.docker.exposedbydefault=false"
|
- "--providers.docker.exposedbydefault=false"
|
||||||
|
|
||||||
@@ -33,6 +33,20 @@ services:
|
|||||||
- ./letsencrypt:/letsencrypt
|
- ./letsencrypt:/letsencrypt
|
||||||
networks:
|
networks:
|
||||||
- proxy_tier
|
- proxy_tier
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "traefik", "healthcheck", "--ping"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 5s
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '2'
|
||||||
|
memory: 512M
|
||||||
|
reservations:
|
||||||
|
cpus: '1'
|
||||||
|
memory: 256M
|
||||||
labels:
|
labels:
|
||||||
# THE MIDDLEWARE DEFINITION
|
# THE MIDDLEWARE DEFINITION
|
||||||
- "traefik.http.middlewares.authelia-auth.forwardauth.address=http://authelia:9091/api/verify?rd=https://auth.quangkhai.ch/"
|
- "traefik.http.middlewares.authelia-auth.forwardauth.address=http://authelia:9091/api/verify?rd=https://auth.quangkhai.ch/"
|
||||||
|
|||||||
Reference in New Issue
Block a user