Files
kadence/docker-compose.yml
T
2026-10-18 18:02:05 +03:00

68 lines
2.4 KiB
YAML

# Kadence: API + web UI in one container, Postgres beside it.
#
# cp .env.example .env # fill in Jira / Todoist / Telegram
# docker compose up -d # http://localhost:8000
#
# The native desktop app runs on your machine and points at this backend.
services:
db:
image: postgres:17-alpine
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-kadence}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-kadence}
POSTGRES_DB: ${POSTGRES_DB:-kadence}
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
# The app's first query happens seconds after boot, so the API must not
# start until Postgres can actually answer.
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-kadence} -d ${POSTGRES_DB:-kadence}"]
interval: 5s
timeout: 5s
retries: 10
app:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
DATABASE_URL: >-
postgresql+psycopg://${POSTGRES_USER:-kadence}:${POSTGRES_PASSWORD:-kadence}@db:5432/${POSTGRES_DB:-kadence}
TZ: ${TIMEZONE:-Europe/Moscow}
TIMEZONE: ${TIMEZONE:-Europe/Moscow}
CORS_ORIGINS: ${CORS_ORIGINS:-*}
API_TOKEN: ${API_TOKEN:-}
SCHEDULER_ENABLED: ${SCHEDULER_ENABLED:-true}
TELEGRAM_BOT_ENABLED: ${TELEGRAM_BOT_ENABLED:-true}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
# Seeds for the editable settings — the same variable names jira-helper
# uses, so an existing .env can be copied across unchanged.
JIRA_BASE_URL: ${JIRA_BASE_URL:-}
JIRA_EMAIL: ${JIRA_EMAIL:-}
JIRA_API_TOKEN: ${JIRA_API_TOKEN:-}
JIRA_EXTRA_JQL: ${JIRA_EXTRA_JQL:-}
JIRA_START_DATE_FIELD: ${JIRA_START_DATE_FIELD:-customfield_10015}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}
GOOGLE_REFRESH_TOKEN: ${GOOGLE_REFRESH_TOKEN:-}
GOOGLE_TASKS_LISTS: ${GOOGLE_TASKS_LISTS:-}
TODOIST_API_TOKEN: ${TODOIST_API_TOKEN:-}
TODOIST_PROJECTS: ${TODOIST_PROJECTS:-}
LAUNDRY_SESSION: ${LAUNDRY_SESSION:-}
LAUNDRY_BASE_URL: ${LAUNDRY_BASE_URL:-https://4ka.inbicst.ru}
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN:-}
TELEGRAM_CHAT_ID: ${TELEGRAM_CHAT_ID:-}
SLACK_WEBHOOK_URL: ${SLACK_WEBHOOK_URL:-}
ports:
- "${APP_PORT:-8000}:8000"
volumes:
db-data: