0
0

Modified ports

This commit is contained in:
Opnxng 2023-11-10 12:35:16 +08:00
parent 5a4e130b58
commit 335d5800b5
5 changed files with 54 additions and 47 deletions

View File

@ -11,7 +11,7 @@ services:
- PGID=1000 - PGID=1000
- TZ=Asia/Singapore - TZ=Asia/Singapore
ports: ports:
- 9091:9091 - 8888:9091
volumes: volumes:
- {{ docker_dir }}/authelia:/config - {{ docker_dir }}/authelia:/config
restart: unless-stopped restart: unless-stopped

View File

@ -28,7 +28,7 @@ services:
depends_on: depends_on:
- gitea-db - gitea-db
ports: ports:
- "3000:3000" - "8885:3000"
networks: networks:
- gitea - gitea

View File

@ -23,7 +23,7 @@ services:
- {{ docker_dir }}/ntfy/user.db:/var/lib/ntfy/user.db - {{ docker_dir }}/ntfy/user.db:/var/lib/ntfy/user.db
restart: unless-stopped restart: unless-stopped
ports: ports:
- '8911:80' - '8894:80'
healthcheck: # optional: remember to adapt the host:port to your environment healthcheck: # optional: remember to adapt the host:port to your environment
test: ["CMD-SHELL", "wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1"] test: ["CMD-SHELL", "wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1"]
interval: 60s interval: 60s

View File

@ -196,29 +196,18 @@
} }
} }
@t host t.{$HOSTNAME} @b host b.{$HOSTNAME}
handle @t { handle @b {
encode zstd gzip reverse_proxy {{ oracle1_private_ip }}:8884
reverse_proxy {
to {{ oracle1_private_ip }}:8889
to {{ oracle2_private_ip }}:8889
to {{ oracle3_private_ip }}:8889
to {{ oracle4_private_ip }}:8889
lb_policy ip_hash
lb_try_duration 5s
lb_try_interval 1s
fail_duration 30s
max_fails 3
}
header { header {
Content-Security-Policy "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
X-Robots-Tag "noindex, noimageindex, nosnippet, notranslate, noarchive, nofollow" X-Robots-Tag "noindex, noimageindex, nosnippet, notranslate, noarchive, nofollow"
} }
} }
@b host b.{$HOSTNAME} @git host git.{$HOSTNAME}
handle @b { handle @git {
reverse_proxy {{ oracle1_private_ip }}:8884 encode zstd gzip
reverse_proxy {{ oracle3_private_ip }}:8885
header { header {
X-Robots-Tag "noindex, noimageindex, nosnippet, notranslate, noarchive, nofollow" X-Robots-Tag "noindex, noimageindex, nosnippet, notranslate, noarchive, nofollow"
} }
@ -252,6 +241,31 @@
} }
} }
@auth host auth.{$HOSTNAME}
handle @auth {
reverse_proxy {{ oracle4_private_ip }}:8888
}
@t host t.{$HOSTNAME}
handle @t {
encode zstd gzip
reverse_proxy {
to {{ oracle1_private_ip }}:8889
to {{ oracle2_private_ip }}:8889
to {{ oracle3_private_ip }}:8889
to {{ oracle4_private_ip }}:8889
lb_policy ip_hash
lb_try_duration 5s
lb_try_interval 1s
fail_duration 30s
max_fails 3
}
header {
Content-Security-Policy "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self' https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
X-Robots-Tag "noindex, noimageindex, nosnippet, notranslate, noarchive, nofollow"
}
}
@m host m.{$HOSTNAME} @m host m.{$HOSTNAME}
handle @m { handle @m {
encode zstd gzip encode zstd gzip
@ -307,7 +321,7 @@
} }
} }
handle @f { handle @f {
forward_auth {{ oracle4_private_ip }}:9091 { forward_auth {{ oracle4_private_ip }}:8888 {
uri /api/verify?rd=https://auth.opnxng.com/ uri /api/verify?rd=https://auth.opnxng.com/
copy_headers Remote-User Remote-Groups Remote-Name Remote-Email copy_headers Remote-User Remote-Groups Remote-Name Remote-Email
#import trusted_proxy_list #import trusted_proxy_list
@ -320,9 +334,13 @@
} }
} }
@auth host auth.{$HOSTNAME} @nt host nt.{$HOSTNAME}
handle @auth { handle @nt {
reverse_proxy {{ oracle4_private_ip }}:9091 encode zstd gzip
reverse_proxy {{ oracle3_private_ip }}:8894
header {
X-Robots-Tag "noindex, noimageindex, nosnippet, notranslate, noarchive, nofollow"
}
} }
@v host v.{$HOSTNAME} @v host v.{$HOSTNAME}
@ -597,24 +615,6 @@
} }
} }
@git host git.{$HOSTNAME}
handle @git {
encode zstd gzip
reverse_proxy {{ oracle3_private_ip }}:3000
header {
X-Robots-Tag "noindex, noimageindex, nosnippet, notranslate, noarchive, nofollow"
}
}
@nt host nt.{$HOSTNAME}
handle @nt {
encode zstd gzip
reverse_proxy {{ oracle3_private_ip }}:8911
header {
X-Robots-Tag "noindex, noimageindex, nosnippet, notranslate, noarchive, nofollow"
}
}
} }
# ---------------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------------
@ -664,5 +664,3 @@ i.r.{$HOSTNAME} {
abort abort
} }
} }
# ----------------------------------------------------------------------------------------------------

View File

@ -1,7 +1,16 @@
compose: setup:
oracle4: oracle4:
- caddy - caddy
compose:
oracle4:
- authelia
- caddy
oracle3:
- ntfy
- gitea
# ---------------------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------------------
deployed-compose: deployed-compose: