Files
Todo/docker-compose.yml
Paul Bailey ff16860d8a Revert to production build with proper cookie settings
- Production build is more stable than dev mode
- Cookie settings already fixed for HTTP
- NextAuth v5 beta works better in production mode
2025-12-02 13:31:19 +00:00

44 lines
1.0 KiB
YAML

services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "3500:3000"
environment:
- NODE_ENV=production
- DATABASE_URL=${DATABASE_URL}
- AUTH_URL=http://localhost:3500
- NEXTAUTH_URL=http://localhost:3500
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
- AUTH_SECRET=${AUTH_SECRET}
- AUTH_TRUST_HOST=true
restart: unless-stopped
depends_on:
- db-check
networks:
- app-network
# Health check service to ensure MySQL is accessible
db-check:
image: mysql:8.0
command: >
sh -c "
until mysqladmin ping -h$${DB_HOST} -P$${DB_PORT} -u$${DB_USER} -p$${DB_PASSWORD} --silent; do
echo 'Waiting for MySQL...';
sleep 2;
done;
echo 'MySQL is ready!';
"
environment:
- DB_HOST=${DB_HOST:-localhost}
- DB_PORT=${DB_PORT:-3306}
- DB_USER=${DB_USER:-root}
- DB_PASSWORD=${DB_PASSWORD}
networks:
- app-network
networks:
app-network:
driver: bridge