mirror of
https://github.com/opf/openproject-deploy.git
synced 2026-05-26 16:32:52 +00:00
* [#55776] added custom image for proxy - based on caddy:2 - copy assets from openproject image into proxy image * [#55776] removed static asset serving from proxy - https://community.openproject.org/wp/55776 - apparently caddy correctly redirects asset requests to the web service
This commit is contained in:
17
compose/proxy/Caddyfile.template
Normal file
17
compose/proxy/Caddyfile.template
Normal file
@@ -0,0 +1,17 @@
|
||||
:80 {
|
||||
reverse_proxy * http://${APP_HOST}:8080 {
|
||||
# The following directives are needed to make the proxy forward explicitly the X-Forwarded-* headers. If unset,
|
||||
# Caddy will reset them. See: https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#defaults
|
||||
# This is needed, if you are using a reverse proxy in front of the compose stack and Caddy is NOT your first
|
||||
# point of contact.
|
||||
# When using Caddy is reachable as a first point of contact, it is highly recommended to configure the server's
|
||||
# global `trusted_proxies` directive. See: https://caddyserver.com/docs/caddyfile/options#trusted-proxies
|
||||
|
||||
header_up X-Forwarded-Proto {header.X-Forwarded-Proto}
|
||||
header_up X-Forwarded-For {header.X-Forwarded-For}
|
||||
}
|
||||
|
||||
file_server
|
||||
|
||||
log
|
||||
}
|
||||
8
compose/proxy/Dockerfile
Normal file
8
compose/proxy/Dockerfile
Normal file
@@ -0,0 +1,8 @@
|
||||
FROM caddy:2
|
||||
|
||||
COPY ./Caddyfile.template /etc/caddy/Caddyfile.template
|
||||
|
||||
ARG APP_HOST
|
||||
RUN sed 's|${APP_HOST}|'"$APP_HOST"'|g' /etc/caddy/Caddyfile.template > /etc/caddy/Caddyfile
|
||||
|
||||
ENTRYPOINT ["caddy", "run", "--config", "/etc/caddy/Caddyfile"]
|
||||
Reference in New Issue
Block a user