next15-docker/docker-compose.yml
2025-01-11 01:03:44 +05:00

37 lines
823 B
YAML

services:
web:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NODE_ENV=production
env_file:
- .env
depends_on:
- database
# Add any other environment variables your app needs
# If you need to persist any data
# volumes:
# - ./data:/app/data
restart: unless-stopped
# If you need to configure healthcheck
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
# interval: 30s
# timeout: 10s
# retries: 3
database:
image: postgres:14
hostname: sarlink-portal-db
volumes:
- db-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: testpass123
POSTGRES_DB: mydb
volumes:
db-data: