chore: update dependencies and add .dockerignore file
- Updated MUI packages to version 5.x and x-charts/x-date-pickers to 7.x - Downgraded React and React-DOM to version 18.3.1 - Added .dockerignore to exclude unnecessary files from Docker context
This commit is contained in:
+59
-29
@@ -1,54 +1,84 @@
|
||||
# =============================================================================
|
||||
# Docker Compose - Production Configuration for Coolify
|
||||
# Docker Compose - Production Configuration
|
||||
# =============================================================================
|
||||
# Optimized for:
|
||||
# - Fast cold starts
|
||||
# - Minimal resource usage
|
||||
# - Zero-downtime deployments
|
||||
# - Coolify compatibility
|
||||
# Optimized for: Coolify deployment with production best practices
|
||||
# =============================================================================
|
||||
|
||||
services:
|
||||
app:
|
||||
image: nobat724-front:latest
|
||||
container_name: nobat724-app
|
||||
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
# Enable BuildKit for faster builds and layer caching
|
||||
# Enable BuildKit for better caching
|
||||
args:
|
||||
- BUILDKIT_INLINE_CACHE=1
|
||||
- DOCKER_BUILDKIT=1
|
||||
# Cache strategy for faster rebuilds
|
||||
cache_from:
|
||||
- node:20-alpine
|
||||
BUILDKIT_INLINE_CACHE: "1"
|
||||
# Multi-platform support (optional)
|
||||
# platforms:
|
||||
# - linux/amd64
|
||||
# - linux/arm64
|
||||
|
||||
# Container restart policy
|
||||
# Restart policy
|
||||
restart: unless-stopped
|
||||
|
||||
# Dynamic port mapping (Coolify manages external port)
|
||||
# Port mapping (Coolify handles external mapping)
|
||||
ports:
|
||||
- "3000"
|
||||
- "3000: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}
|
||||
# Next.js runtime
|
||||
PORT: 3000
|
||||
HOSTNAME: "0.0.0.0"
|
||||
NODE_ENV: production
|
||||
NEXT_TELEMETRY_DISABLED: 1
|
||||
|
||||
# Resource limits (optimized for low traffic sites)
|
||||
# API configuration
|
||||
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-https://api.nobat724.com}
|
||||
NEXT_PUBLIC_CLIENT_ID: ${NEXT_PUBLIC_CLIENT_ID}
|
||||
NEXT_PUBLIC_CLIENT_SECRET: ${NEXT_PUBLIC_CLIENT_SECRET}
|
||||
DEV_MODE: "false"
|
||||
|
||||
# Health check (uses Dockerfile HEALTHCHECK)
|
||||
healthcheck:
|
||||
test:
|
||||
[
|
||||
"CMD-SHELL",
|
||||
'node -e "require(''http'').get(''http://localhost:3000/'', (res) => { process.exit(res.statusCode === 200 ? 0 : 1); }).on(''error'', () => { process.exit(1); });"',
|
||||
]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
# Resource limits
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "0.5"
|
||||
memory: 512M
|
||||
cpus: "1.0"
|
||||
memory: 1G
|
||||
reservations:
|
||||
cpus: "0.1"
|
||||
memory: 128M
|
||||
cpus: "0.25"
|
||||
memory: 256M
|
||||
|
||||
# Logging configuration
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: "3"
|
||||
|
||||
# Security options
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
|
||||
# Read-only root filesystem (except for .next cache)
|
||||
# read_only: true
|
||||
# tmpfs:
|
||||
# - /tmp
|
||||
# - /app/.next/cache
|
||||
|
||||
# Networks (Coolify uses bridge network)
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user