mirror of
https://github.com/ublue-os/forge.git
synced 2025-07-04 16:55:45 +03:00
feat: add caddy as reverse proxy (#8)
This commit is contained in:
parent
b2b2f81b5d
commit
aab9df8e04
3 changed files with 50 additions and 1 deletions
28
rvproxy/Caddyfile
Normal file
28
rvproxy/Caddyfile
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Global options
|
||||
{
|
||||
auto_https disable_certs
|
||||
persist_config off
|
||||
}
|
||||
|
||||
# Reverse-proxy configuration
|
||||
*.ublue.local {
|
||||
## TLS certificates
|
||||
tls /certs/_.ublue.local/cert.pem /certs/_.ublue.local/key.pem
|
||||
|
||||
# container registry
|
||||
@registry host registry.ublue.local
|
||||
|
||||
handle @registry {
|
||||
reverse_proxy ublue-os_forge-registry.ublue.local:5000 {
|
||||
transport http {
|
||||
tls
|
||||
tls_trusted_ca_certs /certs/minica.pem
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Fallback for otherwise unhandled domains
|
||||
handle {
|
||||
respond "Bad hostname" 400
|
||||
}
|
||||
}
|
5
rvproxy/Containerfile
Normal file
5
rvproxy/Containerfile
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Source Image
|
||||
FROM docker.io/library/caddy:2.6.4-alpine
|
||||
|
||||
# Add configuration file
|
||||
COPY ./Caddyfile /etc/caddy/Caddyfile
|
Loading…
Add table
Add a link
Reference in a new issue