Skip to content

Commit

Permalink
proxy app configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mfenner committed Nov 6, 2024
1 parent e4b7127 commit fc3ee20
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
25 changes: 24 additions & 1 deletion fly/applications/caddy/Caddyfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
{
auto_https off
log {
level DEBUG
level ERROR
}
}
:8080 {
# issue Let's Encrypt certificate with DNS challenge on DigitalOcean
# tls {
# dns digitalocean {env.DO_TOKEN}
# }

# redirect Rogue Scholar legacy URLs
@posts path /posts/* /en/posts/* /de/posts/* /es/posts/* /fr/posts/* /it/posts/* /pt/posts/* /tr/posts/*
@about path /about /en/about /de/about /es/about /fr/about /it/about /pt/about /tr/about
Expand All @@ -21,6 +26,24 @@
uri replace /pt /
uri replace /tr /

handle /blogs/syldavia_gazette* {
uri path_regexp /blogs/syldavia_gazette /communities/syldavia_gazette/records

uri query {
query>q
page>p
-category
-generator
-language
}

# header fly-replay "app=invenio-rdm-starter"

reverse_proxy 2a09:8280:1::39:a377:0 {
header_up Host beta.rogue-scholar.org
}
}

handle /blogs* {
handle /blogs/* {
uri path_regexp /blogs/([^/]+) /communities/$1/records
Expand Down
9 changes: 8 additions & 1 deletion fly/applications/caddy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
FROM caddy:2.8.4
ARG CADDY_VERSION=2.8.4
FROM caddy:${CADDY_VERSION}-builder AS builder

RUN xcaddy build \
--with github.com/caddy-dns/digitalocean

FROM caddy:${CADDY_VERSION}-alpine

COPY --from=builder /usr/bin/caddy /usr/bin/caddy
COPY ./Caddyfile /etc/caddy/Caddyfile

0 comments on commit fc3ee20

Please sign in to comment.