1. Caddy version (caddy version
):
2. How I run Caddy:
a. System environment:
- docker-compose
- x86, aarch64
b. Command:
caddy run --config /etc/caddy/Caddyfile
d. My complete Caddyfile or JSON config:
:80 {
log {
output stdout
level INFO
}
uri replace /~* /urbit/~*
redir /apps/ /urbit/apps/
handle_path /admin/* {
reverse_proxy localhost:2019
}
handle_path /netdata/* {
reverse_proxy netdata:{$NETDATA_PORT:19999}
}
handle_path /minio-api/* {
reverse_proxy minio-s3:{$MINIO_API_PORT:9000}
}
handle_path /minio/* {
reverse_proxy minio-s3:{$MINIO_DASHBOARD_PORT:9001} {
header_up X-Forwarded-Proto {schema}
header_up X-Forwarded-Host {host}
header_up Host {host}:9000
}
}
handle_path /urbit/* {
reverse_proxy urbit:{$URBIT_DASHBOARD_PORT:80}
}
}
3. The problem I’m having:
- /minio/ is a blank screen
- The
urbit
service does a bunch of redirects that I want to foresee:- / will redirect to /~/login
- After login, it will redirect to /apps/grid/ . Every subsequent path will be
/apps/grid/X
- It may load assets from
/~<asset>
. Note it’s not necessarily/~/X
.
So, what I want really is to foresee for all these possible redirects and paths and simply replace /PATH
with /urbit/PATH
. This will kick the handle_path
directive and everything will work out, as caddy will deliver the request PATH
to the appropriate container (urbit
).
Currently, this doesn’t work. For example, when I open /apps/grid/
and I click on a selection, it opens a new window to /apps/grid/X
, while I would expect to replace /apps/
with /urbit/apps
, thus kicking off the correct handle_path.
I am new to Caddy, but I have spent about 2 days trying to make this work. The software is really impressive, so I am really thankful for your help .
5. What I already tried:
- Spent a couple of hours trying different combinations of
redir
,rewrite
,uri
and combingminio
and other resources. - Every service(container) is accessible via direct port (e.g localhost:9001 for minio). In the end-build the ports will not be exposed, but while developing they are.