Files
contact/docker-compose.yml
T
2026-06-11 13:53:27 +02:00

47 lines
1001 B
YAML

services:
postgres:
image: postgres:16-alpine
container_name: contact-postgres
restart: unless-stopped
env_file:
- .env
environment:
POSTGRES_DB: ${POSTGRES_DB:-contact}
POSTGRES_USER: ${POSTGRES_USER:-contact}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-this-db-password}
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
contact:
build:
context: .
dockerfile: Dockerfile
container_name: contact
ports:
- "${APP_PORT}:3000"
env_file:
- .env
environment:
NEXT_TELEMETRY_DISABLED: "1"
DATABASE_URL: ${DATABASE_URL_DOCKER:-postgresql://contact:change-this-db-password@postgres:5432/contact}
restart: unless-stopped
depends_on:
- postgres
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:3000/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
volumes:
postgres-data: