ops: real domain in Caddyfile + ignore egg-info
This commit is contained in:
parent
08a63f611d
commit
68e95aa1ce
2 changed files with 26 additions and 24 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -6,6 +6,7 @@
|
||||||
.venv/
|
.venv/
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
|
*.egg-info/
|
||||||
node_modules/
|
node_modules/
|
||||||
|
|
||||||
# Env / secrets
|
# Env / secrets
|
||||||
|
|
|
||||||
49
Caddyfile
49
Caddyfile
|
|
@ -1,16 +1,34 @@
|
||||||
# Caddy config.
|
# Caddy config.
|
||||||
#
|
#
|
||||||
# Two site blocks:
|
# - gendsgn.ru — main production site, auto-TLS via Let's Encrypt.
|
||||||
# 1. :80 — handles all HTTP traffic by IP (no domain yet) for development access.
|
# - www.gendsgn.ru — 301 redirect to apex (canonical URL).
|
||||||
# Returns plain HTTP, no TLS. Will be removed once a domain is bought.
|
# - :80 — fallback for raw IP access. Will be removed once everyone uses the domain.
|
||||||
# 2. gendesign.example.ru — production block with auto-TLS via Let's Encrypt.
|
|
||||||
# Activates only after DNS A-record is set on this domain.
|
|
||||||
#
|
|
||||||
# Replace gendesign.example.ru with your actual domain when bought.
|
|
||||||
#
|
#
|
||||||
# `handle /api/*` (NOT `handle_path`) — we keep the /api prefix because
|
# `handle /api/*` (NOT `handle_path`) — we keep the /api prefix because
|
||||||
# the FastAPI router is mounted at /api/v1/*.
|
# the FastAPI router is mounted at /api/v1/*.
|
||||||
|
|
||||||
|
gendsgn.ru {
|
||||||
|
encode zstd gzip
|
||||||
|
|
||||||
|
handle /api/* {
|
||||||
|
reverse_proxy backend:8000
|
||||||
|
}
|
||||||
|
|
||||||
|
handle /health {
|
||||||
|
reverse_proxy backend:8000
|
||||||
|
}
|
||||||
|
|
||||||
|
handle {
|
||||||
|
reverse_proxy frontend:3000
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
www.gendsgn.ru {
|
||||||
|
redir https://gendsgn.ru{uri} permanent
|
||||||
|
}
|
||||||
|
|
||||||
|
# Plain HTTP by IP — kept for ssh-tunnel / debugging.
|
||||||
|
# Caddy issues no TLS here (no hostname).
|
||||||
:80 {
|
:80 {
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
|
|
||||||
|
|
@ -22,23 +40,6 @@
|
||||||
reverse_proxy backend:8000
|
reverse_proxy backend:8000
|
||||||
}
|
}
|
||||||
|
|
||||||
# Frontend (Next.js) — catches everything else
|
|
||||||
handle {
|
|
||||||
reverse_proxy frontend:3000
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gendesign.example.ru {
|
|
||||||
encode zstd gzip
|
|
||||||
|
|
||||||
handle /api/* {
|
|
||||||
reverse_proxy backend:8000
|
|
||||||
}
|
|
||||||
|
|
||||||
handle /health {
|
|
||||||
reverse_proxy backend:8000
|
|
||||||
}
|
|
||||||
|
|
||||||
handle {
|
handle {
|
||||||
reverse_proxy frontend:3000
|
reverse_proxy frontend:3000
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue