68 lines
1.9 KiB
YAML
68 lines
1.9 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: panel-postgres
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-panel}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-panel_secret}
|
|
POSTGRES_DB: ${POSTGRES_DB:-panel}
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-panel} -d ${POSTGRES_DB:-panel}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
migrate:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.migrate
|
|
container_name: panel-migrate
|
|
env_file: .env
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
command:
|
|
- "${DATABASE_URL_DOCKER:-postgres://panel:panel_secret@postgres:5432/panel?sslmode=disable}"
|
|
- "up"
|
|
profiles:
|
|
- migrate
|
|
|
|
panel:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.panel
|
|
container_name: panel-app
|
|
restart: unless-stopped
|
|
env_file: .env
|
|
environment:
|
|
DATABASE_URL: ${DATABASE_URL_DOCKER:-postgres://panel:panel_secret@postgres:5432/panel?sslmode=disable}
|
|
HTTP_PORT: "8000"
|
|
DEFAULT_SERVER_NAME: ${DEFAULT_SERVER_NAME:-local}
|
|
DEFAULT_SERVER_HOSTNAME: ${DEFAULT_SERVER_HOSTNAME:-server1}
|
|
DEFAULT_SERVER_IP: ${DEFAULT_SERVER_IP:-127.0.0.1}
|
|
ACME_EMAIL: ${ACME_EMAIL:-}
|
|
ACME_STAGING: ${ACME_STAGING:-false}
|
|
SSL_STORAGE_PATH: /etc/ssl/panel
|
|
NGINX_SITES_DIR: /etc/nginx/panel
|
|
NGINX_RELOAD_CMD: ${NGINX_RELOAD_CMD:-}
|
|
ACME_HTTP_ADDR: ${ACME_HTTP_ADDR:-}
|
|
ports:
|
|
- "${HTTP_PORT:-8000}:8000"
|
|
- "80:80"
|
|
volumes:
|
|
- /var/www:/var/www
|
|
- /etc/ssl/panel:/etc/ssl/panel
|
|
- /etc/nginx/panel:/etc/nginx/panel
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
postgres_data:
|