Self-Hosting
almyty can be self-hosted using Docker Compose for single-server deployments or Kubernetes with Kustomize for production clusters.
Docker Hub
Official images are published to Docker Hub:
docker pull almyty/api:latest
docker pull almyty/frontend:latest| Image | Base | Description |
|---|---|---|
almyty/api | node:24-alpine | Backend API server |
almyty/frontend | nginx:1.25-alpine | Frontend SPA served via nginx |
Tags: latest (most recent master build), vX.Y.Z (releases), sha-XXXXXXX (per-commit).
Docker Compose
The repository includes a docker-compose.yml that runs all services.
Quick start
git clone https://github.com/almyty/almyty.git
cd almyty
cp .env.example .env # edit with your values
docker-compose up -dThe frontend is available at http://localhost:8080 and the backend API at http://localhost:4000.
Services
| Service | Image | Port (host) | Port (container) |
|---|---|---|---|
postgres | postgres:16-alpine | 5432 | 5432 |
redis | redis:7-alpine | 6379 | 6379 |
backend | almyty/api | 4000 | 3000 |
frontend | almyty/frontend | 8080 | 8080 |
Building from source
If you need custom builds instead of pulling from Docker Hub:
docker build -t almyty/api ./backend
docker build -t almyty/frontend ./frontendBoth Dockerfiles are multi-stage. The backend builds on node:24-alpine and produces a minimal production image. The frontend builds the Vite app on node:24-alpine and copies the output into nginx:1.25-alpine.
Kubernetes
The repository provides Kustomize base manifests with three overlays.
Overlays
| Overlay | Purpose |
|---|---|
development | Local k8s (minikube, kind). Single replicas, no TLS. |
staging | Pre-production. Managed Postgres, ENCRYPTION_KEY wired. |
production | Full production. Multiple replicas, TLS via cert-manager, resource limits. |
Deploy
# Development
kubectl apply -k k8s/overlays/development
# Staging
kubectl apply -k k8s/overlays/staging
# Production
kubectl apply -k k8s/overlays/productionTLS
The production overlay includes a cert-manager ClusterIssuer for Let’s Encrypt. Set DOMAIN in the overlay’s configmap to your domain. Certificates are provisioned automatically.
Required environment variables
| Variable | Description | Example |
|---|---|---|
DATABASE_HOST | PostgreSQL hostname | localhost |
DATABASE_PORT | PostgreSQL port | 5432 |
DATABASE_USERNAME | PostgreSQL user | almyty |
DATABASE_PASSWORD | PostgreSQL password | — |
DATABASE_NAME | PostgreSQL database name | almyty |
DB_SSL | Enable SSL for managed databases | true or false |
REDIS_HOST | Redis hostname | localhost |
REDIS_PORT | Redis port | 6379 |
JWT_SECRET | Secret for signing JWT tokens | Random 64+ char string |
ENCRYPTION_KEY | AES-256 key for encrypting credentials | Random 32-byte hex string |
Optional variables
| Variable | Description | Default |
|---|---|---|
PORT | Backend listen port | 3000 |
FRONTEND_URL | Frontend origin for CORS | http://localhost:3002 |
VITE_API_BASE_URL | API origin for the frontend (cross-domain deploys) | (same origin) |
ANALYTICS_RETENTION_DAYS | How long to keep request/audit logs | 90 |
BULL_REDIS_HOST | Separate Redis for BullMQ (if desired) | Falls back to REDIS_HOST |
MAIL_HOST | SMTP host for outbound email | — |
MAIL_PORT | SMTP port | 587 |
MAIL_USER | SMTP username | — |
MAIL_PASS | SMTP password | — |
Health check endpoints
The backend exposes three health endpoints:
| Endpoint | Purpose | Checks |
|---|---|---|
GET /health | Full health | Database, Redis, disk, memory |
GET /health/live | Liveness probe | Process is running |
GET /health/ready | Readiness probe | Database and Redis are reachable |
Kubernetes probes
livenessProbe:
httpGet:
path: /health/live
port: 3000
initialDelaySeconds: 10
periodSeconds: 15
readinessProbe:
httpGet:
path: /health/ready
port: 3000
initialDelaySeconds: 5
periodSeconds: 10Upgrades
docker-compose pull
docker-compose up -dTypeORM runs pending migrations automatically on startup (migrationsRun: true). Back up the database before upgrading.