Skip to content

Deployment

This guide covers deploying Stowry in production environments.

Terminal window
docker run -d \
--name stowry \
-p 5708:5708 \
-v $(pwd)/config.yaml:/app/config.yaml:ro \
-v $(pwd)/data:/app/data \
ghcr.io/sagarc03/stowry:latest serve
docker-compose.yml
version: '3.8'
services:
stowry:
image: ghcr.io/sagarc03/stowry:latest
container_name: stowry
restart: unless-stopped
ports:
- "5708:5708"
volumes:
- ./config.yaml:/app/config.yaml:ro
- stowry-data:/app/data
command: serve
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:5708/"]
interval: 30s
timeout: 10s
retries: 3
volumes:
stowry-data:
docker-compose.yml
version: '3.8'
services:
stowry:
image: ghcr.io/sagarc03/stowry:latest
container_name: stowry
restart: unless-stopped
ports:
- "5708:5708"
environment:
- STOWRY_DATABASE_TYPE=postgres
- STOWRY_DATABASE_DSN=postgres://stowry:password@postgres:5432/stowry?sslmode=disable
- STOWRY_DATABASE_AUTO_MIGRATE=true
volumes:
- ./config.yaml:/app/config.yaml:ro
- stowry-data:/app/data
command: serve
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:16-alpine
container_name: stowry-db
restart: unless-stopped
environment:
- POSTGRES_USER=stowry
- POSTGRES_PASSWORD=password
- POSTGRES_DB=stowry
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U stowry"]
interval: 5s
timeout: 5s
retries: 5
volumes:
stowry-data:
postgres-data: