Files
nobat724_front/docker-compose.yml
T
hamedandClaude Sonnet 4.6 1aa9f82d2a fix: resolve critical bugs and security issues across the project
- Fix GPS map links always sending literal "latitude"/"longitude" strings
  instead of actual coordinates in openLocation/Content.js
- Add api.clinic-pro.ir to next.config.js remotePatterns so production
  images load correctly
- Fix appointment page: await params and getStateInfo (Next.js 15 pattern)
- Enable 401 handling in api.js: clear cookies and redirect to /login
- Move OAuth client_secret to server-side API routes (/api/auth/token,
  /api/auth/refresh) so it is never bundled into client-side JavaScript
- Update SendReq, SubmitData, ButtonSendData to call API routes instead
  of directly sending client_secret from the browser
- Update docker-compose.yml to use server-only CLIENT_SECRET env var
- Remove debug console.log from clinic doctors list component

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 22:18:11 +03:30

93 lines
2.3 KiB
YAML

# =============================================================================
# Docker Compose - Production Configuration
# =============================================================================
# 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 better caching
args:
BUILDKIT_INLINE_CACHE: "1"
# Multi-platform support (optional)
# platforms:
# - linux/amd64
# - linux/arm64
# Restart policy
restart: unless-stopped
# Expose port (Coolify handles port mapping)
expose:
- "3000"
# Environment variables
environment:
# Next.js runtime
PORT: ${APP_PORT:-3000}
HOSTNAME: "0.0.0.0"
NODE_ENV: ${NODE_ENV:-production}
NEXT_TELEMETRY_DISABLED: 1
# API configuration
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL}
DEV_MODE: ${DEV_MODE:-FALSE}
# Server-only OAuth credentials (not exposed to browser)
CLIENT_ID: ${CLIENT_ID:-${NEXT_PUBLIC_CLIENT_ID}}
CLIENT_SECRET: ${CLIENT_SECRET:-${NEXT_PUBLIC_CLIENT_SECRET}}
# 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: "1.0"
memory: 1G
reservations:
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
networks:
- coolify
# Network configuration
networks:
coolify:
name: coolify
external: true