update caddy to use netbird dns server and authelia to use expose port to host's localhost
This commit is contained in:
@@ -1,29 +1,21 @@
|
|||||||
auth.{{ authelia_domain }} {
|
auth.{{ authelia_domain }} {
|
||||||
reverse_proxy authelia:{{ authelia_port }}
|
reverse_proxy 127.0.0.1:{{ authelia_port }}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Reusable snippet for Authelia Forward Auth
|
# Reusable snippet for Authelia Forward Auth
|
||||||
(authelia_auth) {
|
(authelia_auth) {
|
||||||
forward_auth http://authelia:9091 { # Replace with your Authelia IP/Port or container name
|
forward_auth http://127.0.0.1:9091 { # Replace with your Authelia IP/Port or container name
|
||||||
uri /api/verify?rd=https://auth.frantecrt.duckdns.org # Replace with your public Authelia URL
|
uri /api/verify?rd=https://auth.frantecrt.duckdns.org # Replace with your public Authelia URL
|
||||||
copy_headers Remote-User Remote-Groups Remote-Email Remote-Name
|
copy_headers Remote-User Remote-Groups Remote-Email Remote-Name
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
test.frantecrt.duckdns.org {
|
|
||||||
# Import the auth configuration block
|
|
||||||
import authelia_auth
|
|
||||||
|
|
||||||
# Route the traffic to your backend application if authenticated
|
|
||||||
reverse_proxy frantecrt.duckdns.org:8080
|
|
||||||
}
|
|
||||||
|
|
||||||
semaphore.frantecrt.duckdns.org {
|
semaphore.frantecrt.duckdns.org {
|
||||||
# Import the auth configuration block
|
# Import the auth configuration block
|
||||||
import authelia_auth
|
import authelia_auth
|
||||||
|
|
||||||
# Route the traffic to your backend application if authenticated
|
# Route the traffic to your backend application if authenticated
|
||||||
reverse_proxy semaphore:3000
|
reverse_proxy semaphore.netbird.cloud:3000
|
||||||
}
|
}
|
||||||
|
|
||||||
git.frantecrt.duckdns.org {
|
git.frantecrt.duckdns.org {
|
||||||
@@ -31,5 +23,5 @@ git.frantecrt.duckdns.org {
|
|||||||
import authelia_auth
|
import authelia_auth
|
||||||
|
|
||||||
# Route the traffic to your backend application if authenticated
|
# Route the traffic to your backend application if authenticated
|
||||||
reverse_proxy gitea:3000
|
reverse_proxy semaphore.netbird.cloud:3000
|
||||||
}
|
}
|
||||||
@@ -5,10 +5,8 @@ services:
|
|||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- {{ authelia_config_dir }}:/config
|
- {{ authelia_config_dir }}:/config
|
||||||
networks:
|
ports:
|
||||||
- authelia_net
|
- "127.0.0.1:{{ authelia_port }}:{{ authelia_port }}"
|
||||||
expose:
|
|
||||||
- "{{ authelia_port }}"
|
|
||||||
environment:
|
environment:
|
||||||
- TZ={{ ansible_facts.timezone | default('UTC') }}
|
- TZ={{ ansible_facts.timezone | default('UTC') }}
|
||||||
|
|
||||||
@@ -16,16 +14,8 @@ services:
|
|||||||
image: caddy:2
|
image: caddy:2
|
||||||
container_name: authelia_caddy
|
container_name: authelia_caddy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
network_mode: host
|
||||||
- "80:80"
|
|
||||||
- "443:443"
|
|
||||||
volumes:
|
volumes:
|
||||||
- {{ authelia_base_dir }}/Caddyfile:/etc/caddy/Caddyfile
|
- {{ authelia_base_dir }}/Caddyfile:/etc/caddy/Caddyfile
|
||||||
- {{ authelia_data_dir }}/caddy_data:/data
|
- {{ authelia_data_dir }}/caddy_data:/data
|
||||||
- {{ authelia_data_dir }}/caddy_config:/config
|
- {{ authelia_data_dir }}/caddy_config:/config
|
||||||
networks:
|
|
||||||
- authelia_net
|
|
||||||
|
|
||||||
networks:
|
|
||||||
authelia_net:
|
|
||||||
driver: bridge
|
|
||||||
Reference in New Issue
Block a user