Add production Docker deployment configuration

- Add multi-stage Dockerfile for Next.js standalone build
- Add docker-compose.deploy.yml for production deployment
- Add entrypoint.sh for database migration and startup
- Add .dockerignore for efficient Docker builds
- Add docker/.env.production with all required env vars
- Add Caddyfile.prod with security headers and optimizations
- Update next.config.ts with output: standalone for Docker
- Add DOCKER_DEPLOYMENT.md with comprehensive deployment guide
This commit is contained in:
Arnaud
2026-07-01 11:13:30 +02:00
parent 8b57a3fd87
commit b2ac623836
7 changed files with 469 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
#!/bin/sh
set -e
# Wait for database to be ready
until pg_isready -h "${DB_HOST:-postgres}" -U "${POSTGRES_USER:-epicure}" -d "${POSTGRES_DB:-epicure}"; do
echo "Waiting for PostgreSQL to be ready..."
sleep 2
done
echo "PostgreSQL is ready!"
# Run migrations
echo "Running database migrations..."
cd /app/apps/web
pnpm db:migrate || true
echo "Starting application..."
exec node /app/apps/web/.next/standalone/server.js