deploy: PORT/HOST configurabili in .env + .env.example versionato

- .env: aggiunte vars PORT=8080, HOST=127.0.0.1, REGISTRY, TAG
- docker-compose.yml: usa ${PORT:-8080} sia per container env che per
  traefik loadbalancer.server.port (coerenza)
- .env.example: template versionato con valori default sicuri
  (.env resta in .gitignore, non committato)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-24 16:24:42 +02:00
parent 71a364a1fd
commit 46e9941488
15 changed files with 16 additions and 2 deletions
+14
View File
@@ -0,0 +1,14 @@
# Copia questo file in .env e adatta i valori.
# .env NON è versionato (contiene config locale/secrets).
# Cartella immagini (relativa al progetto in dev locale,
# assoluta dentro container es. /data/images)
IMAGES_DIR=Test
# Web server
HOST=127.0.0.1
PORT=8080
# Registry + tag per docker-compose (deploy VPS)
REGISTRY=localhost:5000
TAG=latest
Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 536 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 293 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 KiB

+2 -2
View File
@@ -14,7 +14,7 @@ services:
environment: environment:
IMAGES_DIR: /data/images IMAGES_DIR: /data/images
HOST: 0.0.0.0 HOST: 0.0.0.0
PORT: 8080 PORT: ${PORT:-8080}
volumes: volumes:
# Persistenza immagini tra restart (upload/selezione) # Persistenza immagini tra restart (upload/selezione)
- ./images:/data/images - ./images:/data/images
@@ -28,7 +28,7 @@ services:
- "traefik.http.routers.pm2d.entrypoints=websecure" - "traefik.http.routers.pm2d.entrypoints=websecure"
- "traefik.http.routers.pm2d.tls=true" - "traefik.http.routers.pm2d.tls=true"
- "traefik.http.routers.pm2d.tls.certresolver=letsencrypt" - "traefik.http.routers.pm2d.tls.certresolver=letsencrypt"
- "traefik.http.services.pm2d.loadbalancer.server.port=8080" - "traefik.http.services.pm2d.loadbalancer.server.port=${PORT:-8080}"
# Middleware: upload fino a 50MB (default Traefik bufferizza a 4MB) # Middleware: upload fino a 50MB (default Traefik bufferizza a 4MB)
- "traefik.http.middlewares.pm2d-bodysize.buffering.maxRequestBodyBytes=52428800" - "traefik.http.middlewares.pm2d-bodysize.buffering.maxRequestBodyBytes=52428800"