Files
patchmon.net/docker/backend.docker-entrypoint.sh
tigattack bf2ea908f4 refactor(docker): rework docker
- Move Docker files to own directory (tidier since I added several more files)
- Optimise images and reduce size
  - Uses multi-stage builds
  - Optimises layer efficiency
  - Uses NGINX as base for frontend
- Sets default env vars
- Uses tini for proper signal handling
2025-09-22 23:42:00 +01:00

18 lines
297 B
Bash
Executable File

#!/bin/sh
# Enable strict error handling
set -e
# Function to log messages with timestamp
log() {
echo "[$(date +'%Y-%m-%d %H:%M:%S')] $*" >&2
}
log "Starting PatchMon Backend..."
log "Running database migrations..."
npx prisma migrate deploy
log "Starting application..."
exec npm start