mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-01-29 01:28:59 -05:00
chore: change location of Caddyfiles
This commit is contained in:
parent
3946f6f237
commit
7e09ae1f98
4 changed files with 16 additions and 19 deletions
|
@ -53,7 +53,7 @@ COPY --from=backend-builder /opt/app/package.json ./
|
||||||
|
|
||||||
WORKDIR /opt/app
|
WORKDIR /opt/app
|
||||||
|
|
||||||
COPY ./reverse-proxy /etc/caddy
|
COPY ./reverse-proxy /opt/app/reverse-proxy
|
||||||
COPY ./scripts ./scripts
|
COPY ./scripts ./scripts
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
:3000 {
|
:3000 {
|
||||||
# Reverse proxy for /api
|
# Reverse proxy for /api
|
||||||
reverse_proxy /api/* http://localhost:{$BACKEND_PORT:8080}
|
reverse_proxy /api/* http://localhost:{$BACKEND_PORT:8080}
|
||||||
|
|
||||||
# Reverse proxy for all other requests
|
# Reverse proxy for all other requests
|
||||||
reverse_proxy http://localhost:{$PORT:3333}
|
reverse_proxy http://localhost:{$PORT:3333}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
:3000 {
|
:3000 {
|
||||||
reverse_proxy /* http://localhost:{$PORT:3333} {
|
# Reverse proxy for /api
|
||||||
trusted_proxies 0.0.0.0/0
|
reverse_proxy /api/* http://localhost:{$BACKEND_PORT:8080} {
|
||||||
}
|
trusted_proxies 0.0.0.0/0
|
||||||
|
}
|
||||||
|
|
||||||
reverse_proxy /api/* http://localhost:{$BACKEND_PORT:8080} {
|
# Reverse proxy for all other requests
|
||||||
trusted_proxies 0.0.0.0/0
|
reverse_proxy /* http://localhost:{$PORT:3333} {
|
||||||
}
|
trusted_proxies 0.0.0.0/0
|
||||||
|
}
|
||||||
log {
|
}
|
||||||
output file /var/log/caddy/access.log
|
|
||||||
level WARN
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -5,9 +5,9 @@ cp -rn /tmp/img/* /opt/app/frontend/public/img
|
||||||
|
|
||||||
# Start Caddy
|
# Start Caddy
|
||||||
if [ "$TRUST_PROXY" = "true" ]; then
|
if [ "$TRUST_PROXY" = "true" ]; then
|
||||||
caddy start --adapter caddyfile --config /etc/caddy/Caddyfile.trust-proxy &
|
caddy start --adapter caddyfile --config /opt/app/reverse-proxy/Caddyfile.trust-proxy &
|
||||||
else
|
else
|
||||||
caddy start --adapter caddyfile --config /etc/caddy/Caddyfile &
|
caddy start --adapter caddyfile --config /opt/app/reverse-proxy/Caddyfile &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run the frontend server
|
# Run the frontend server
|
||||||
|
|
Loading…
Add table
Reference in a new issue