Skip to content

feat: easy self-deployment with Dockerfile and Docker Compose #366

@manojbajaj95

Description

@manojbajaj95

Summary

Add a Dockerfile and docker-compose.yml so users can self-host the authsome daemon with a single command, plus a deployment guide covering common setups.

Motivation

Running authsome locally today requires installing Python, uv, and the package. For teams or servers that want a persistent credential daemon (e.g. backing a CI runner or a shared agent host), a containerised deployment is far easier to manage, upgrade, and monitor.

Proposed Additions

Dockerfile

  • Multi-stage build: uv builder stage → slim runtime image.
  • Runs the authsome daemon as a non-root user.
  • Exposes port 7998 (daemon HTTP).
  • Mounts ~/.authsome (or /data/authsome) as a named volume so credentials survive container restarts.

docker-compose.yml

  • Single authsome service using the above image.
  • Named volume for AUTHSOME_HOME.
  • restart: unless-stopped.
  • Optional traefik / caddy sidecar snippet for TLS termination (commented out).

Deployment guide (docs/guides/self-hosting.md)

  • Quick-start: docker compose up -d and point AUTHSOME_DAEMON_URL at the container.
  • Volume backup and restore instructions.
  • Upgrading to a new image version.
  • Environment variables reference (AUTHSOME_HOME, AUTHSOME_LOG_LEVEL, encryption mode, etc.).

Work Items

  • Write Dockerfile (multi-stage, non-root, uv-based)
  • Write docker-compose.yml with named volume and restart policy
  • Add docs/guides/self-hosting.md deployment guide
  • Add a .dockerignore
  • CI: add a Docker build job to verify the image builds on every PR
  • Update README.md with a self-hosting quick-start section

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions