feat: Initial commit
This commit is contained in:
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM docker.io/library/caddy:2.9.1-builder as builder
|
||||
|
||||
RUN xcaddy build \
|
||||
--with github.com/caddy-dns/cloudflare
|
||||
|
||||
FROM docker.io/library/caddy:2.9.1-alpine
|
||||
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
|
||||
29
compose.yaml
Normal file
29
compose.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
services:
|
||||
caddy:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: caddy
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
- CLOUDFLARE_EMAIL=${CF_EMAIL}
|
||||
- CLOUDFLARE_API_TOKEN=${CF_AUTH_TOKEN}
|
||||
- ACME_AGREE=true
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
- "443:443/udp"
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
volumes:
|
||||
- ./config:/etc/caddy:z
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
volumes:
|
||||
caddy_data: {}
|
||||
caddy_config: {}
|
||||
41
config/Caddyfile
Normal file
41
config/Caddyfile
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
email {env.ACME_EMAIL}
|
||||
}
|
||||
|
||||
*.housh.dev {
|
||||
tls {
|
||||
dns cloudflare {env.CF_AUTH_TOKEN}
|
||||
resolvers 1.1.1.1
|
||||
}
|
||||
|
||||
@pos host po.housh.dev
|
||||
handle @pos {
|
||||
reverse_proxy purchase_orders:8080
|
||||
}
|
||||
|
||||
@legacypos host legacy-po.housh.dev, legacy-pos.housh.dev
|
||||
handle @legacypos {
|
||||
reverse_proxy po_app:5000
|
||||
}
|
||||
|
||||
@gitea host git.housh.dev
|
||||
handle @gitea {
|
||||
reverse_proxy mightymini.housh.dev:3000
|
||||
}
|
||||
|
||||
@gitea host dash.housh.dev
|
||||
handle @gitea {
|
||||
reverse_proxy homarr:7575
|
||||
}
|
||||
|
||||
@komodo host komo.housh.dev
|
||||
handle @gitea {
|
||||
reverse_proxy mightymini.housh.dev:9120
|
||||
}
|
||||
|
||||
@excalidraw host draw.housh.dev
|
||||
handle @gitea {
|
||||
reverse_proxy mightymini.housh.dev:8180
|
||||
}
|
||||
|
||||
}
|
||||
3
example.env
Normal file
3
example.env
Normal file
@@ -0,0 +1,3 @@
|
||||
ACME_EMAIL="acme@example.com"
|
||||
CF_AUTH_TOKEN="secret-token"
|
||||
CF_EMAIL="cloudflare@example.com"
|
||||
Reference in New Issue
Block a user