mirror of
https://github.com/michivonah/docker.git
synced 2025-12-22 20:36:27 +01:00
add caddy (podman version)
This commit is contained in:
parent
0a7fd56fd2
commit
e7c003ae61
2 changed files with 33 additions and 0 deletions
3
caddy/Caddyfile
Normal file
3
caddy/Caddyfile
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
example.com {
|
||||
reverse_proxy container-name:port
|
||||
}
|
||||
30
caddy/podman.sh
Normal file
30
caddy/podman.sh
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
# Caddy Proxy (Podman script)
|
||||
# Michi von Ah
|
||||
# Link: https://github.com/michivonah/docker/tree/main/caddy
|
||||
|
||||
# Make script executable: chmod +x podman.sh
|
||||
|
||||
# Pod setup
|
||||
podman network create caddy --ignore
|
||||
podman pod create --name caddy --replace
|
||||
|
||||
# Create directories & files
|
||||
mkdir -p data
|
||||
touch Caddyfile
|
||||
|
||||
# Caddy
|
||||
podman run --name caddy-proxy -d \
|
||||
--replace \
|
||||
--pod caddy \
|
||||
-p 80:80 \
|
||||
-p 443:443 \
|
||||
-v ./Caddyfile:/etc/caddy/Caddyfile:z,ro \
|
||||
-v ./data:/data:z,U \
|
||||
--restart always \
|
||||
--network caddy \
|
||||
-u ${UID:-1000}:${GID:-1000} \
|
||||
docker.io/caddy
|
||||
|
||||
# UID & GID should be set by default on most linux distros, so you don't have to change it here.
|
||||
# Add another container to the caddy network: --network caddy
|
||||
Loading…
Add table
Add a link
Reference in a new issue