Files
panelhosting/docker-compose.yml
T
2026-06-17 04:28:17 +03:00

36 lines
779 B
YAML

services:
postgres:
image: postgres:16-alpine
container_name: panel-postgres
restart: unless-stopped
environment:
POSTGRES_USER: panel
POSTGRES_PASSWORD: panel_secret
POSTGRES_DB: panel
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U panel -d panel"]
interval: 5s
timeout: 5s
retries: 5
migrate:
build:
context: .
dockerfile: Dockerfile.migrate
container_name: panel-migrate
depends_on:
postgres:
condition: service_healthy
command:
- "postgres://panel:panel_secret@postgres:5432/panel?sslmode=disable"
- "up"
profiles:
- migrate
volumes:
postgres_data: