Files
2026-06-12 12:42:06 +05:30

72 lines
2.4 KiB
YAML

services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${AUTHSOME_POSTGRES_DB:-authsome}
POSTGRES_USER: ${AUTHSOME_POSTGRES_USER:-authsome}
POSTGRES_PASSWORD: ${AUTHSOME_POSTGRES_PASSWORD:?set AUTHSOME_POSTGRES_PASSWORD}
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${AUTHSOME_POSTGRES_USER:-authsome} -d ${AUTHSOME_POSTGRES_DB:-authsome}",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
redis:
image: redis:7-alpine
restart: unless-stopped
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
authsome:
build: .
image: authsome:latest
restart: unless-stopped
ports:
- "7998:7998"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- authsome-data:/data/authsome
environment:
AUTHSOME_HOST: 0.0.0.0
AUTHSOME_PORT: "7998"
AUTHSOME_HOME: /data/authsome
AUTHSOME_ENV: prod
AUTHSOME_BASE_URL: ${AUTHSOME_BASE_URL:-http://localhost:7998}
AUTHSOME_DATABASE_URL: postgresql://${AUTHSOME_POSTGRES_USER:-authsome}:${AUTHSOME_POSTGRES_PASSWORD:?set AUTHSOME_POSTGRES_PASSWORD}@postgres:5432/${AUTHSOME_POSTGRES_DB:-authsome}
AUTHSOME_REDIS_URL: redis://redis:6379/0
AUTHSOME_DO_NOT_TRACK: "1"
# Set AUTHSOME_MASTER_KEY from your platform secret store before production use.
# AUTHSOME_MASTER_KEY_FILE remains available for platforms that mount a secret file into the container.
AUTHSOME_MASTER_KEY: ${AUTHSOME_MASTER_KEY:?set AUTHSOME_MASTER_KEY}
# Must be identical on every replica because browser sessions are stateless signed JWTs.
AUTHSOME_UI_SESSION_KEY: ${AUTHSOME_UI_SESSION_KEY:?set AUTHSOME_UI_SESSION_KEY}
# Uncomment to use a pre-built image from a registry instead of building locally:
# image: ghcr.io/agentrhq/authsome:latest
# The authsome home volume is retained for logs and fallback key material.
# Postgres and Redis carry the primary production state.
volumes:
authsome-data:
postgres-data:
redis-data: