reinstall
This commit is contained in:
commit
237853b590
29 changed files with 1096 additions and 0 deletions
30
VPS-caddy/Caddyfile
Normal file
30
VPS-caddy/Caddyfile
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
email youremail@email.com
|
||||
}
|
||||
|
||||
|
||||
*.home.mydomain.com {
|
||||
|
||||
vars {
|
||||
# IP address of My Tailscale Server
|
||||
tailscale_ip 100.0.0.0
|
||||
}
|
||||
|
||||
tls {
|
||||
dns gandi APIKEYHERE
|
||||
}
|
||||
|
||||
@jellyfin host jellyfin.home.mydomain.com
|
||||
handle @jellyfin {
|
||||
reverse_proxy {vars.tailscale_ip}:8096
|
||||
}
|
||||
@books host books.home.mydomain.com
|
||||
handle @books {
|
||||
reverse_proxy {vars.tailscale_ip}:8083
|
||||
}
|
||||
# Fallback for otherwise unhandled domains
|
||||
handle {
|
||||
abort
|
||||
}
|
||||
}
|
||||
|
||||
20
VPS-caddy/DNS-settings
Normal file
20
VPS-caddy/DNS-settings
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# If your main domain is mydomain.com, the following settings will
|
||||
# setup a wildcard setting so you can use *.home.mydomain.com for all your services.
|
||||
# For example: jellyfin.home.mydomain.com / books.home.mydomain.com etc.
|
||||
|
||||
```
|
||||
DNS SETTINGS
|
||||
--------------------
|
||||
NAME TYPE TTL VALUE
|
||||
--------------------
|
||||
* A 3600 183.11.113.0
|
||||
|
||||
# A record that makes all requests go to mydomain.com
|
||||
|
||||
*.home A 183.11.113.0
|
||||
|
||||
# A record that setups a subdomain so immich.home.mydomain.com or jellyfin.home.mydomain.com can be used.
|
||||
```
|
||||
|
||||
# I set this up on a subdomain so I can use the main domain for other servers.
|
||||
# Maybe I have a server called ninja, I could setup another A record for *.ninja and have jellyfin.ninja.mydomain.com
|
||||
8
VPS-caddy/Dockerfile
Normal file
8
VPS-caddy/Dockerfile
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
FROM caddy:2.8.4-builder-alpine AS builder
|
||||
|
||||
RUN xcaddy build \
|
||||
--with github.com/caddy-dns/gandi
|
||||
|
||||
FROM caddy:2.8.4-alpine
|
||||
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
8
VPS-caddy/README.md
Normal file
8
VPS-caddy/README.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Run Your Homelab Behind your VPS
|
||||
https://blog.arkadi.one/p/run-your-homelab-behind-your-vps/
|
||||
|
||||
## Files in this directory:
|
||||
- Dockerfile - to build a custom Caddy executable with gandi registrar module
|
||||
- docker-compose.yml - to run Caddy
|
||||
- Caddyfile - your caddy settings for a wildcard DNS
|
||||
- DNS-settings - gives you an idea how to setup your DNS for wildcard certificates
|
||||
23
VPS-caddy/docker-compose.yml
Normal file
23
VPS-caddy/docker-compose.yml
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
services:
|
||||
caddy:
|
||||
build: .
|
||||
container_name: Caddy
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
- 443:443/udp
|
||||
env_file:
|
||||
- secrets.env
|
||||
volumes:
|
||||
# I don't like using Docker volumes
|
||||
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- ./data:/data
|
||||
- ./config:/config
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- caddy
|
||||
networks:
|
||||
caddy:
|
||||
name: caddy
|
||||
Loading…
Add table
Add a link
Reference in a new issue