This commit is contained in:
Ccjcarkbla
2026-09-13 10:00:13 -04:00
parent 9b04f26c82
commit 349f469602
31 changed files with 1455 additions and 37 deletions
+45
View File
@@ -0,0 +1,45 @@
name: vitfit-v2
services:
app:
build:
context: ../../app
dockerfile: Dockerfile
args:
NODE_VERSION: "24"
image: vitfit-v2:local
restart: unless-stopped
environment:
NODE_ENV: production
PORT: "3000"
JWT_SECRET: ${V2_JWT_SECRET:?Set a separate V2_JWT_SECRET in .env}
CORS_ORIGIN: https://workouttv2.vitalityfitnessva.com
DB_PATH: /data/vitfit.sqlite
UPLOADS_DIR: /data/uploads
UPLOAD_TEMP_DIR: /data/tmp
UPLOAD_MAX_BYTES: "524288000"
STORAGE_WARN_BYTES: "5368709120"
LOG_LEVEL: info
volumes:
- type: bind
source: ${V2_DATA_DIR:-/var/lib/vitfit-v2}
target: /data
bind:
create_host_path: false
ports:
- "127.0.0.1:3001:3000"
healthcheck:
test:
- CMD
- node
- -e
- "fetch('http://127.0.0.1:3000/health').then(r=>r.json()).then(h=>process.exit(h.db==='ok'?0:1)).catch(()=>process.exit(1))"
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
logging:
driver: json-file
options:
max-size: "20m"
max-file: "5"