Docker
Run the engine with Docker Compose, with Postgres, storage and the Docker runner.
services:
learn:
image: ghcr.io/sespinosav/sypnia-learn:1
ports: ["8097:8097"]
environment:
SYPNIA_LEARN_DATABASE_URL: postgres://sypnia:${DB_PASSWORD}@db:5432/sypnia_learn
SYPNIA_LEARN_ROOT_TOKEN: ${SYPNIA_LEARN_ROOT_TOKEN}
SYPNIA_LEARN_PUBLIC_URL: https://learn.myschool.org
SYPNIA_LEARN_OIDC_ISSUER: https://accounts.myschool.org
SYPNIA_LEARN_OIDC_CLIENT_ID: sypnia-learn
SYPNIA_LEARN_STORAGE_URL: s3://sypnia-learn?endpoint=http://storage:9000
SYPNIA_LEARN_RUNNER: docker=http://runner:8098
SYPNIA_LEARN_RUNNER_SECRET: ${RUNNER_SECRET}
SYPNIA_LEARN_AI_URL: http://ai:8095/v1
SYPNIA_LEARN_AUTO_MIGRATE: "true"
depends_on: [db, storage, runner]
runner:
image: ghcr.io/sespinosav/sypnia-learn-runner:1
environment:
SYPNIA_LEARN_RUNNER_SECRET: ${RUNNER_SECRET}
volumes: ["/var/run/docker.sock:/var/run/docker.sock"]
db:
image: postgres:16
environment: { POSTGRES_USER: sypnia, POSTGRES_PASSWORD: "${DB_PASSWORD}", POSTGRES_DB: sypnia_learn }
volumes: [db:/var/lib/postgresql/data]
storage:
image: minio/minio
command: server /data
volumes: [storage:/data]
volumes: { db: {}, storage: {} }- The Docker runner runs each check in a throwaway container: no network except package registries, nothing from the host mounted, 2 CPUs, 2 GB and 10 minutes at most. It is the only container that sees the Docker socket. For stronger isolation, point
SYPNIA_LEARN_RUNNERat a Sypnia Agent sandbox instead. - Explanations need a model endpoint; leave
SYPNIA_LEARN_AI_URLout and «Explain this» and hints are off. - Health is
GET /v1/health; metrics for Prometheus atGET /metrics, with the root token. - Size. The engine needs about 256 MB of memory. The runner needs about 2 GB for each check running at the same time.