Files
Domain_web/docker-compose.yml
Андрей Бобырев ab5c0084b2 fix: node-native VPS deploy when disk is low
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-24 22:22:41 +03:00

54 lines
1.3 KiB
YAML

services:
web:
build: .
ports:
- "${PORT:-3000}:3000"
environment:
NODE_ENV: production
DATABASE_URL: postgresql://scanner:scanner@postgres:5432/domain_scanner?schema=public
REDIS_URL: redis://redis:6379
NEXTAUTH_URL: ${NEXTAUTH_URL:-http://localhost:3000}
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET:-change-me-in-production}
NEXT_PUBLIC_APP_URL: ${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
postgres:
image: postgres:16-alpine
ports:
- "127.0.0.1:5432:5432"
environment:
POSTGRES_USER: scanner
POSTGRES_PASSWORD: scanner
POSTGRES_DB: domain_scanner
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U scanner -d domain_scanner"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
ports:
- "127.0.0.1:6379:6379"
command: redis-server --appendonly yes
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
restart: unless-stopped
volumes:
postgres_data:
redis_data: