feat: deploy in Docker on the a75 server like cam85

Nginx image built locally for amd64 and loaded via docker save/load,
compose on the a75 network behind Nginx Proxy Manager (port 3000).
Live on officinezuliani.a75.eu with noindex on non-production hosts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-04 15:18:44 +01:00
co-authored by Claude Opus 5.5
parent 4f66dcf61d
commit 0571890d47
11 changed files with 222 additions and 6 deletions
+31 -5
View File
@@ -1,7 +1,33 @@
# Deploy
Hosting not decided yet (see `docs/adr/0003-stack-astro-statico.md`). Record the choice as a new ADR, then document here:
- Build: `npm run build` → upload `dist/`
- Server rule: serve `/<page>` from `/<page>.html` (e.g. nginx `try_files $uri $uri.html $uri/ =404;`)
- Keep the current URLs (`/officina`, `/servizi`, `/dove-siamo`, `/contatti`) so no redirects are needed
- Rollback procedure: TBD
Hosting: Docker on the a75 server, same flow as cam85 (`docs/adr/0004-hosting-docker-server-a75.md`).
## Deploy
```
./deploy.sh
```
It builds locally, builds the amd64 image, loads it on `217.76.62.220`, runs `docker compose up -d` in `/home/ubuntu/officinezuliani` and checks `http://officinezuliani-site:3000/` from the Nginx Proxy Manager container.
Requirements: SSH key access as `root@217.76.62.220`, Docker with buildx, Node/npm.
## Publish a hostname (one-time, Nginx Proxy Manager UI)
1. DNS: A record of the hostname → `217.76.62.220`
2. NPM → Proxy Hosts → Add: forward hostname `officinezuliani-site`, port `3000`, scheme `http`
3. SSL tab: request a Let's Encrypt certificate, force SSL
## Test the image locally
```
docker buildx build --platform linux/amd64 -t officinezuliani-web:latest --load .
docker run --rm -p 8089:3000 officinezuliani-web:latest # http://localhost:8089
```
## Rollback
Check out the previous good commit and run `./deploy.sh` again.
## Server layout
- `/home/ubuntu/officinezuliani/docker-compose.yml` (copied by deploy.sh)
- Container `officinezuliani-site` on network `a75`, port 3000, no host ports
## Hostnames
- Test: https://officinezuliani.a75.eu (NPM proxy host #35, Let's Encrypt) — served with `noindex`
- Production: `www.officinezulianiudine.it` — still on Italiaonline/Duda; at launch point DNS to `217.76.62.220`, add it to the NPM proxy host with a certificate, and redirect `officinezulianiudine.it` → `www`