feat(autopass): domeniu public autopass.romfast.ro + decom roa-qr
- IIS site dedicat 'autopass' (ID 7) pe VM201 → proxy Traefik LXC103, cert win-acme HTTP-01 selfhosting + install IIS (auto-renew/auto-bind) - monitor-ssl-certificates.sh: +autopass.romfast.ro (ID 7), -roa-qr (decom) - doc autopass.md: setup domeniu public + pasul Dokploy (Add Domain + redeploy) roa-qr.romfast.ro decomisionat (migrat la qr.roa.romfast.ro, acoperit de wildcard): site IIS + dir + cert + renewal win-acme eliminate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ Gateway RAR AUTOPASS (Python / FastAPI) care preia prezentări de service-auto
|
|||||||
declară la RAR AUTOPASS (Legea 142/2023). Deployat pe Dokploy / LXC 103 ca serviciu
|
declară la RAR AUTOPASS (Legea 142/2023). Deployat pe Dokploy / LXC 103 ca serviciu
|
||||||
Docker Compose.
|
Docker Compose.
|
||||||
|
|
||||||
- **Domeniu:** `autopass.roa.romfast.ro`
|
- **Domenii:** `autopass.romfast.ro` (public, site IIS dedicat) + `autopass.roa.romfast.ro` (prin wildcard)
|
||||||
- **Server:** LXC 103 (10.0.20.167)
|
- **Server:** LXC 103 (10.0.20.167)
|
||||||
- **Deployment:** Dokploy → Docker Compose, provider **Custom Git**
|
- **Deployment:** Dokploy → Docker Compose, provider **Custom Git**
|
||||||
- **Repo:** `git@gitea.romfast.ro:romfast/rar-autopass.git`, branch **`main`**
|
- **Repo:** `git@gitea.romfast.ro:romfast/rar-autopass.git`, branch **`main`**
|
||||||
@@ -150,6 +150,38 @@ explicit — preferabil prin Environment în Dokploy, nu hardcodat în compose.
|
|||||||
## DNS
|
## DNS
|
||||||
|
|
||||||
```
|
```
|
||||||
|
autopass.romfast.ro A 188.26.14.103
|
||||||
autopass.roa.romfast.ro A 188.26.14.103
|
autopass.roa.romfast.ro A 188.26.14.103
|
||||||
```
|
```
|
||||||
Acoperit de wildcard `*.roa.romfast.ro` (DNS + cert win-ACME pe VM 201).
|
`autopass.roa…` e acoperit de wildcard `*.roa.romfast.ro`. `autopass.romfast.ro` e
|
||||||
|
single-name → are site IIS + cert propriu (vezi mai jos).
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Domeniu public `autopass.romfast.ro` (site IIS dedicat)
|
||||||
|
|
||||||
|
Spre deosebire de `*.roa`, domeniul public single-name are nevoie de **site IIS propriu**
|
||||||
|
pe VM 201 (model identic cu `roa-qr` — pattern din `setup-new-iis-sites.ps1`).
|
||||||
|
|
||||||
|
**IIS (VM 201, 10.0.20.122)** — Site ID **7**, nume `autopass`:
|
||||||
|
- HTTP `:80` + HTTPS `:443` hostHeader `autopass.romfast.ro`, SNI (SslFlags 1)
|
||||||
|
- `C:\inetpub\autopass\web.config` = catch-all rewrite → `http://10.0.20.167/{R:1}`
|
||||||
|
(Traefik LXC 103) cu `X-Forwarded-Proto/Host` + `X-Real-IP`
|
||||||
|
|
||||||
|
**Cert SSL — win-acme HTTP-01, auto-renew** (la fel ca site-urile 1–5):
|
||||||
|
```powershell
|
||||||
|
C:\Tools\win-acme\wacs.exe --source iis --siteid 7 --host autopass.romfast.ro `
|
||||||
|
--validationmode http-01 --validation selfhosting --installation iis `
|
||||||
|
--store certificatestore --accepttos --emailaddress admin@romfast.ro
|
||||||
|
```
|
||||||
|
- Validation `selfhosting` (c7d5e050) — ascultă pe http.sys, **nu** e blocat de catch-all-ul
|
||||||
|
din web.config. Install `iis` (ea6a5be3) → re-leagă automat binding-ul SNI la renew.
|
||||||
|
- Renewal: `[IIS] autopass, autopass.romfast.ro`, Scheduled Task "win-acme renew", next ~2026-08-23.
|
||||||
|
- Monitorizat în `monitor-ssl-certificates.sh` (Site ID 7) ca safety-net.
|
||||||
|
|
||||||
|
**Pas necesar în Dokploy** (Traefik rutează după Host → trebuie domeniul adăugat explicit):
|
||||||
|
> Dokploy → service `autopass` → **Domains** → **Add Domain**
|
||||||
|
> - Host: `autopass.romfast.ro`, Service: **`api`**, Container Port: **`8010`**, Path: `/`
|
||||||
|
> - **HTTPS: OFF** (entrypoint `web`) — TLS-ul public se termină la IIS; Certificate: None
|
||||||
|
> Save → Traefik hot-reload. Înainte de pas: `https://autopass.romfast.ro/` → **404** (Traefik
|
||||||
|
> n-are router pe acest Host). După pas: **200**.
|
||||||
|
|||||||
@@ -24,12 +24,13 @@ DOMAINS=(
|
|||||||
"dokploy.romfast.ro"
|
"dokploy.romfast.ro"
|
||||||
"gitea.romfast.ro"
|
"gitea.romfast.ro"
|
||||||
"roa2web.romfast.ro"
|
"roa2web.romfast.ro"
|
||||||
"roa-qr.romfast.ro"
|
"autopass.romfast.ro"
|
||||||
"efactura.roa.romfast.ro"
|
"efactura.roa.romfast.ro"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Site IDs pentru fiecare domeniu (in aceeasi ordine)
|
# Site IDs pentru fiecare domeniu (in aceeasi ordine)
|
||||||
SITE_IDS=(1 2 3 4 5 "WILDCARD")
|
# NOTA: roa-qr.romfast.ro decomisionat 2026-06-29 (migrat la qr.roa.romfast.ro, acoperit de wildcard)
|
||||||
|
SITE_IDS=(1 2 3 4 7 "WILDCARD")
|
||||||
|
|
||||||
log() {
|
log() {
|
||||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" | tee -a "$LOG_FILE"
|
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" | tee -a "$LOG_FILE"
|
||||||
|
|||||||
Reference in New Issue
Block a user