Skip to content

Commit

Permalink
Add systemd system service example (configured with User=)
Browse files Browse the repository at this point in the history
The implementation makes use of

ExecStart=bash -c "exec nsenter \
    --preserve-credentials \
    --net=/proc/$(cat $XDG_RUNTIME_DIR/containers/networks/aardvark-dns/aardvark.pid)/ns/net \
    --user=/proc/$(cat $XDG_RUNTIME_DIR/libpod/tmp/pause.pid)/ns/user \
    --mount=/proc/$(cat $XDG_RUNTIME_DIR/libpod/tmp/pause.pid)/ns/mnt \
    /usr/local/bin/caddy run --environ --config /srv/caddy/Caddyfile"

Fixes: #21

Signed-off-by: Erik Sjölund <[email protected]>
  • Loading branch information
eriksjolund committed Nov 24, 2024
1 parent 631819b commit 37fcfcc
Show file tree
Hide file tree
Showing 6 changed files with 490 additions and 0 deletions.
42 changes: 42 additions & 0 deletions examples/example6/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
auto_https disable_redirects
admin fd/6
}

http://whoami.example.com {
bind fd/3 {
protocols h1
}
log
reverse_proxy whoami.example.com:80
}

https://whoami.example.com {
bind fd/4 {
protocols h1 h2
}
bind fdgram/5 {
protocols h3
}
log
reverse_proxy whoami.example.com:80
}

http://static.example.com {
bind fd/3 {
protocols h1
}
root * /srv/caddy/caddy_static
file_server
}

https://static.example.com {
bind fd/4 {
protocols h1 h2
}
bind fdgram/5 {
protocols h3
}
root * /srv/caddy/caddy_static
file_server
}
Loading

0 comments on commit 37fcfcc

Please sign in to comment.