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>
@@ -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
|
||||
|
Before Width: | Height: | Size: 109 KiB |
|
Before Width: | Height: | Size: 536 KiB |
|
Before Width: | Height: | Size: 625 KiB |
|
Before Width: | Height: | Size: 572 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 106 KiB |
|
Before Width: | Height: | Size: 108 KiB |
|
Before Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 293 KiB |
|
Before Width: | Height: | Size: 312 KiB |
|
Before Width: | Height: | Size: 312 KiB |
|
Before Width: | Height: | Size: 338 KiB |
|
Before Width: | Height: | Size: 260 KiB |
@@ -14,7 +14,7 @@ services:
|
||||
environment:
|
||||
IMAGES_DIR: /data/images
|
||||
HOST: 0.0.0.0
|
||||
PORT: 8080
|
||||
PORT: ${PORT:-8080}
|
||||
volumes:
|
||||
# Persistenza immagini tra restart (upload/selezione)
|
||||
- ./images:/data/images
|
||||
@@ -28,7 +28,7 @@ services:
|
||||
- "traefik.http.routers.pm2d.entrypoints=websecure"
|
||||
- "traefik.http.routers.pm2d.tls=true"
|
||||
- "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)
|
||||
- "traefik.http.middlewares.pm2d-bodysize.buffering.maxRequestBodyBytes=52428800"
|
||||
|
||||