Files

52 lines
2.3 KiB
Caddyfile
Raw Permalink Normal View History

# Meezi — Caddy reverse proxy
#
# Set DOMAIN and ACME_EMAIL in your .env, then:
# docker compose -f docker-compose.yml -f docker-compose.admin.yml -f docker-compose.caddy.yml up -d
#
# Caddy auto-provisions Let's Encrypt TLS — no certbot needed.
# Domains needed in DNS (all → same server IP):
# meezi.ir, app.meezi.ir, api.meezi.ir,
# koja.meezi.ir, admin.meezi.ir, admin-api.meezi.ir
# status.meezi.ir (only if the monitoring stack is running — see docs/monitoring.md)
{
email {$ACME_EMAIL}
}
# ── Marketing website ────────────────────────────────────────────────────────
{$DOMAIN} {
reverse_proxy website:3000
}
# ── Cafe owner dashboard ─────────────────────────────────────────────────────
app.{$DOMAIN} {
reverse_proxy web:3000
}
# ── Main API ─────────────────────────────────────────────────────────────────
api.{$DOMAIN} {
reverse_proxy api:8080
}
# ── Koja (public discovery) ──────────────────────────────────────────────────
koja.{$DOMAIN} {
reverse_proxy koja:3000
}
# ── Super-Admin panel ────────────────────────────────────────────────────────
admin.{$DOMAIN} {
reverse_proxy admin-web:3000
}
# ── Super-Admin API ──────────────────────────────────────────────────────────
admin-api.{$DOMAIN} {
reverse_proxy admin-api:8080
}
# ── Uptime monitoring (Uptime Kuma) ──────────────────────────────────────────
# Only resolves if the monitoring stack is up (docker-compose.monitoring.yml).
# Caddy ignores upstreams that don't exist until the container is running.
status.{$DOMAIN} {
reverse_proxy uptime-kuma:3001
}