mirror of
https://github.com/dagu-org/dagu.git
synced 2025-12-28 06:34:22 +00:00
* **New Features** * Built-in RBAC auth with JWT login, token handling, and user lifecycle APIs (list/create/view/update/delete, reset/change password). * **UI** * Login flow, protected routes, Users management page, change/reset-password modals, user menu and role-aware navigation. * **Behavior** * v1 routes disabled when auth enabled; runtime config exposes authMode and usersDir; client persists auth token. * **Documentation** * Added builtin auth docs and new env/config options. * **Tests** * Extensive tests for auth service, file-backed store, and API handlers.
65 lines
2.3 KiB
YAML
65 lines
2.3 KiB
YAML
services:
|
|
dagu:
|
|
image: ghcr.io/dagu-org/dagu:latest
|
|
container_name: dagu-dev
|
|
hostname: dagu-dev
|
|
|
|
# Expose the web UI on localhost:8080
|
|
ports:
|
|
- "8080:8080"
|
|
|
|
entrypoint: [] # Override any default entrypoint for Docker in Docker (DinD) support
|
|
|
|
# Default command: run all-in-one (server + scheduler + coordinator in-process)
|
|
# You may override this at runtime, e.g.:
|
|
# docker compose -f compose.dev.yaml run --rm dagu dagu server
|
|
command: ["dagu", "start-all"]
|
|
|
|
# Recommended dev environment variables
|
|
environment:
|
|
# Frontend server
|
|
- DAGU_HOST=0.0.0.0 # Bind inside container
|
|
- DAGU_PORT=8080 # Web/UI port inside container
|
|
- DAGU_DEBUG=true # More verbose logs during dev
|
|
# Paths
|
|
- DAGU_DAGS_DIR=/var/lib/dagu/dags
|
|
# Builtin authentication (RBAC) - CHANGE TOKEN_SECRET IN PRODUCTION
|
|
- DAGU_AUTH_MODE=builtin
|
|
- DAGU_AUTH_TOKEN_SECRET=CHANGE_ME_TO_A_SECURE_RANDOM_STRING
|
|
# Admin credentials: password auto-generated on first run, printed to stdout
|
|
# - DAGU_AUTH_ADMIN_USERNAME=admin # default is 'admin'
|
|
# - DAGU_AUTH_ADMIN_PASSWORD= # set to use a specific password
|
|
# - DAGU_AUTH_TOKEN_TTL=24h # default is 24h
|
|
# Timezone / base path (optional)
|
|
# - DAGU_TZ=UTC
|
|
# - DAGU_BASE_PATH=/dagu
|
|
# User and Group IDs (optional, for file permissions)
|
|
# - PUID=1000 # optional. default is 1000
|
|
# - PGID=1000 # optional. default is 1000
|
|
|
|
# Dev-friendly mounts (persistent data + read-only DAGs)
|
|
volumes:
|
|
- dagu-data:/var/lib/dagu
|
|
- ./dags:/var/lib/dagu/dags:ro
|
|
# For Docker in Docker (DinD) support, mount the host Docker socket:
|
|
- /var/run/docker.sock:/var/run/docker.sock
|
|
|
|
# Quick command presets (uncomment any one to run specific component):
|
|
# command: ["dagu", "server"]
|
|
# command: ["dagu", "scheduler"]
|
|
# command: ["dagu", "coordinator"]
|
|
# command: ["dagu", "worker"]
|
|
|
|
# Alternative: basic auth (simpler, no user management)
|
|
# To use basic auth instead of builtin auth, comment out
|
|
# DAGU_AUTH_MODE and DAGU_AUTH_TOKEN_SECRET above, then uncomment:
|
|
# environment:
|
|
# - DAGU_AUTH_BASIC_USERNAME=dev
|
|
# - DAGU_AUTH_BASIC_PASSWORD=devpass
|
|
|
|
user: "0:0" # Run as root for Docker in Docker (DinD) support
|
|
|
|
volumes:
|
|
dagu-data:
|
|
driver: local
|