Files
nobat724_front/docker-compose.yml
T

62 lines
1.6 KiB
YAML

# =============================================================================
# Docker Compose - Production Configuration for Coolify
# =============================================================================
# Optimized for:
# - Fast cold starts
# - Minimal resource usage
# - Zero-downtime deployments
# - Coolify compatibility
# =============================================================================
services:
app:
build:
context: .
dockerfile: Dockerfile
# Enable BuildKit for faster builds and layer caching
args:
- BUILDKIT_INLINE_CACHE=1
- DOCKER_BUILDKIT=1
# Cache strategy for faster rebuilds
cache_from:
- node:20-alpine
# Container restart policy
restart: unless-stopped
# Dynamic port mapping (Coolify manages external port)
ports:
- "3000"
# Environment variables
# Note: Coolify injects these automatically from project settings
environment:
# Node.js
- NODE_ENV=${NODE_ENV:-production}
- PORT=3000
- HOSTNAME=0.0.0.0
- DEV_MODE=false
- NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
- NEXT_PUBLIC_CLIENT_ID=${NEXT_PUBLIC_CLIENT_ID}
- NEXT_PUBLIC_CLIENT_SECRET=${NEXT_PUBLIC_CLIENT_SECRET}
# Resource limits (optimized for low traffic sites)
deploy:
resources:
limits:
cpus: "0.5"
memory: 512M
reservations:
cpus: "0.1"
memory: 128M
# Networks (Coolify uses bridge network)
networks:
- coolify
# Network configuration
networks:
coolify:
driver: bridge
external: true