mirror of
https://github.com/gurucomputing/headscale-ui.git
synced 2026-01-23 02:34:43 +00:00
caddy container now uses environment variables
This commit is contained in:
parent
1f3814597e
commit
e1f116bf06
3 changed files with 15 additions and 11 deletions
|
|
@ -1,9 +1,18 @@
|
|||
{
|
||||
skip_install_trust
|
||||
http_port 8080
|
||||
https_port 443
|
||||
http_port {$HTTP_PORT}
|
||||
https_port {$HTTPS_PORT}
|
||||
}
|
||||
:443 {
|
||||
|
||||
:{$HTTP_PORT} {
|
||||
redir / /web
|
||||
uri strip_prefix /web
|
||||
file_server {
|
||||
root /web
|
||||
}
|
||||
}
|
||||
|
||||
:{$HTTPS_PORT} {
|
||||
redir / /web
|
||||
uri strip_prefix /web
|
||||
tls internal {
|
||||
|
|
|
|||
|
|
@ -34,8 +34,9 @@ FROM alpine:latest
|
|||
ENV PROJECT_NAME="headscale-ui"
|
||||
# URL for the github/git location
|
||||
ENV PROJECT_URL="https://github.com/gurucomputing/headscale-ui"
|
||||
# Port that caddy will run on
|
||||
ENV PORT="443"
|
||||
# Ports that caddy will run on
|
||||
ENV HTTPS_PORT="443"
|
||||
ENV HTTP_PORT="80"
|
||||
|
||||
# Production Web Server port. Runs a self signed SSL certificate
|
||||
EXPOSE 443
|
||||
|
|
|
|||
|
|
@ -12,11 +12,5 @@ then
|
|||
cp /staging/Caddyfile /data/Caddyfile
|
||||
fi
|
||||
|
||||
# replace port in Caddyfile if set
|
||||
if [ "$PORT" != "443" ]
|
||||
then
|
||||
sed -i "s/443/$PORT/g" /data/Caddyfile
|
||||
fi
|
||||
|
||||
echo "Starting Caddy"
|
||||
/usr/sbin/caddy run --adapter caddyfile --config /data/Caddyfile
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue