Files
git.stella-ops.org/devops/services/authority/docker-compose.authority.yaml
2026-01-25 23:27:41 +02:00

82 lines
2.7 KiB
YAML

# =============================================================================
# AUTHORITY - LOCAL DEVELOPMENT STACK
# =============================================================================
# OAuth2/OIDC identity provider development environment.
#
# Usage:
# docker compose -f docker-compose.authority.yaml up -d
#
# For production, use compose/docker-compose.stella-ops.yml instead.
# =============================================================================
services:
authority:
build:
context: ../..
dockerfile: ops/authority/Dockerfile
image: stellaops-authority:dev
container_name: stellaops-authority
depends_on:
postgres:
condition: service_healthy
valkey:
condition: service_healthy
environment:
# Override issuer to match your deployment URL.
STELLAOPS_AUTHORITY__ISSUER: "https://authority.localtest.me"
# Storage configuration (PostgreSQL)
STELLAOPS_AUTHORITY__STORAGE__DRIVER: "postgres"
STELLAOPS_AUTHORITY__STORAGE__POSTGRES__CONNECTIONSTRING: "Host=postgres;Port=5432;Database=authority;Username=stellaops;Password=stellaops"
# Cache configuration (Valkey)
STELLAOPS_AUTHORITY__CACHE__REDIS__CONNECTIONSTRING: "valkey:6379"
# Plugin configuration
STELLAOPS_AUTHORITY__PLUGINDIRECTORIES__0: "/app/plugins"
STELLAOPS_AUTHORITY__PLUGINS__CONFIGURATIONDIRECTORY: "/app/etc/authority.plugins"
volumes:
# Mount Authority configuration + plugins (edit etc/authority.yaml before running).
- ../../etc/authority.yaml:/etc/authority.yaml:ro
- ../../etc/authority.plugins:/app/etc/authority.plugins:ro
# Optional: persist plugin binaries or key material outside the container.
- authority-keys:/app/keys
ports:
- "8080:8080"
restart: unless-stopped
postgres:
image: postgres:18.1-alpine
container_name: stellaops-authority-postgres
environment:
POSTGRES_USER: stellaops
POSTGRES_PASSWORD: stellaops
POSTGRES_DB: authority
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U stellaops -d authority"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
valkey:
image: valkey/valkey:9.0.1-alpine
container_name: stellaops-authority-valkey
command: ["valkey-server", "--save", "60", "1"]
volumes:
- valkey-data:/data
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
postgres-data:
valkey-data:
authority-keys: