r2
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
services:
|
||||
app:
|
||||
build:
|
||||
context: ../app
|
||||
dockerfile: Dockerfile
|
||||
image: vitfit:latest
|
||||
container_name: vitfit-app
|
||||
restart: unless-stopped
|
||||
|
||||
# Load .env from the app directory; values below override specific keys
|
||||
env_file:
|
||||
- ../app/.env
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
DB_PATH: /data/vitfit.sqlite
|
||||
UPLOADS_DIR: /data/uploads
|
||||
UPLOAD_TEMP_DIR: /data/tmp
|
||||
|
||||
volumes:
|
||||
# Bind-mount host directory so DB + uploads survive container rebuilds.
|
||||
# Create on first deploy: sudo mkdir -p /var/vitfit/data && sudo chown 1000:1000 /var/vitfit/data
|
||||
- /var/vitfit/data:/data
|
||||
|
||||
# Only expose to localhost — nginx proxies inbound HTTPS traffic
|
||||
ports:
|
||||
- "127.0.0.1:3000:3000"
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://localhost:3000/health"]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 20s
|
||||
|
||||
logging:
|
||||
driver: json-file
|
||||
options:
|
||||
max-size: "20m"
|
||||
max-file: "5"
|
||||
Reference in New Issue
Block a user