Files
admin/host-stacks/vds-kzntsv/sched.compose.yml

43 lines
1.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# sched — custom single-binary (embedded engine + admin API + UI morda + MCP + MariaDB).
# Один контейнер, один HTTP-сервер :8080: /api/* (admin API), /mcp (Streamable HTTP MCP),
# / (UI morda), /sched-ui.bundle.js (static UI bundle).
# Образ registry.kzntsv.site/sched-custom:0.12.1-mysql = published @schedjs/{daemon,storage-mysql,admin-api,mcp,ui}
# + собственный custom-entry.mjs (Dockerfile.custom).
# Прод: VDS рядом с общей MariaDB (стек 11, сеть shared-dbs, отдельная база sched — свой role).
# Endpoint: https://sched.vds.kzntsv.site — /api/* + /mcp, остальное → UI morda.
# Deploy: Portainer-managed (см. portainer-stack-management-vds). Env через Portainer (не env_file).
services:
sched:
image: registry.kzntsv.site/sched-custom:0.12.1-mysql
container_name: sched
restart: unless-stopped
mem_limit: 512m
networks:
- shared-dbs
- proxy
environment:
SCHED_TASKS: /app/config/tasks.json
MYSQL_URL: mysql://sched:${SCHED_DB_PASS}@mariadb:3306/sched?ssl={"rejectUnauthorized":false}
SCHED_ADMIN_KEY: ${SCHED_ADMIN_KEY}
volumes:
- /opt/stacks/sched/tasks.json:/app/config/tasks.json:ro
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:8080/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
labels:
traefik.enable: "true"
traefik.http.routers.sched.entrypoints: websecure
traefik.http.routers.sched.rule: Host(`sched.vds.kzntsv.site`)
traefik.http.routers.sched.tls.certresolver: letsEncrypt
traefik.http.services.sched.loadbalancer.server.port: "8080"
networks:
shared-dbs:
external: true
proxy:
external: true