Files
xymediavault-releases/compose.yaml
T
2026-08-30 10:44:48 +00:00

53 lines
2.0 KiB
YAML

services:
postgres:
image: postgres:17-bookworm
profiles: [local-db]
environment:
POSTGRES_DB: ${XYMEDIA_POSTGRES_DATABASE}
POSTGRES_USER: ${XYMEDIA_POSTGRES_USER}
POSTGRES_PASSWORD_FILE: /run/secrets/xymedia-postgres-password
secrets: [xymedia-postgres-password]
volumes: ["${XYMEDIA_INSTALL_DIR}/data/postgres:/var/lib/postgresql/data"]
healthcheck:
test: [CMD-SHELL, "pg_isready -U ${XYMEDIA_POSTGRES_USER} -d ${XYMEDIA_POSTGRES_DATABASE}"]
interval: 5s
timeout: 5s
retries: 24
app:
build: {context: ., dockerfile: Dockerfile.bootstrap}
image: xymediavault-bootstrap:local
environment:
XYMEDIA_POSTGRES_MODE: external
XYMEDIA_COMPONENT_RUNTIME: local
XYMEDIA_WEB_DIR: /releases/current/web/dist
ports:
- "${XYMEDIA_API_PORT:-18080}:8080"
- "${XYMEDIA_WEBDAV_PORT:-18081}:8081"
- "${XYMEDIA_TVBOX_PORT:-18082}:8082"
volumes:
- "${XYMEDIA_INSTALL_DIR}/data:/app/data"
- "${XYMEDIA_INSTALL_DIR}/components:/app/components"
- "${XYMEDIA_INSTALL_DIR}/releases:/releases"
- "${XYMEDIA_INSTALL_DIR}/config.yaml:/app/config.yaml:ro"
secrets: [xymedia-postgres-password]
restart: unless-stopped
healthcheck:
test: [CMD, /releases/current/bin/xymediavault, healthcheck, --url, http://127.0.0.1:8080/api/health]
app-migrate:
image: xymediavault-bootstrap:local
entrypoint: [/releases/current/bin/xymediavault]
command: [migrate, --new, --config, /app/config.yaml]
environment:
XYMEDIA_POSTGRES_MODE: external
XYMEDIA_EXTERNAL_MIGRATION_CONFIRM: ${XYMEDIA_EXTERNAL_MIGRATION_CONFIRM:-YES}
volumes:
- "${XYMEDIA_INSTALL_DIR}/data:/app/data"
- "${XYMEDIA_INSTALL_DIR}/releases:/releases:ro"
- "${XYMEDIA_INSTALL_DIR}/config.yaml:/app/config.yaml:ro"
secrets: [xymedia-postgres-password]
profiles: [migration]
restart: "no"
secrets:
xymedia-postgres-password:
file: ${XYMEDIA_INSTALL_DIR}/secrets/postgres-password