Skip to content

Instantly share code, notes, and snippets.

@thomascenni
Created March 15, 2025 14:49
Show Gist options
  • Select an option

  • Save thomascenni/faa575baa017c5a5aebcfc484241d275 to your computer and use it in GitHub Desktop.

Select an option

Save thomascenni/faa575baa017c5a5aebcfc484241d275 to your computer and use it in GitHub Desktop.
Kamal version 2
# yaml-language-server: $schema=https://raw.githubusercontent.com/kjellberg/mrsk/validate-with-json-schema/lib/mrsk/configuration/schema.yaml
# Name of your application. Used to uniquely configure containers.
service: dummyapp
# Name of the container image.
image: thomascenni/dummyapp
# Deploy to these servers.
servers:
web:
hosts:
- &host web105
proxy:
host: dummyapp.com
app_port: 8000 # Must match the Gunicorn port
ssl: true
response_timeout: 10
healthcheck:
path: /up/ # Pay attention to final slash for a Django application
interval: 10
timeout: 3
env:
clear:
POSTGRES_USER: dummyapp
POSTGRES_DB: dummyapp
POSTGRES_HOST: dummyapp-db
REDIS_HOST: dummyapp-valkey
MAINTENANCE_MODE: "None"
ENABLE_FB_COMMENTS: "False"
ENABLE_FB_PIXEL: "False"
ALLOWED_HOSTS: "['dummyapp.com']"
secret:
- POSTGRES_PASSWORD
accessories:
db:
image: postgres:13.5
host: *host
env:
clear:
POSTGRES_USER: dummyapp
POSTGRES_DB: dummyapp
secret:
- POSTGRES_PASSWORD
volumes:
- dummyapp-postgresql-data:/var/lib/postgresql/data
valkey:
image: valkey/valkey:7.2.5-bookworm
host: *host
directories:
- data:/data
backup:
image: thomascenni/postgres-backup-minio:0.2
host: *host
env:
clear:
POSTGRES_HOST: dummyapp-db
MINIO_BUCKET: dummyapp
POSTGRES_DATABASE: dummyapp
POSTGRES_USER: dummyapp
SCHEDULE: "@daily"
secret:
- MINIO_HOST
- MINIO_ACCESSKEY
- MINIO_SECRETKEY
- POSTGRES_PASSWORD
# Credentials for your image host.
registry:
server: ghcr.io
username: thomascenni
# Always use an access token rather than real password when possible.
password:
- CR_PAT
# Use a different ssh user than root
ssh:
user: admin
# Configure builder setup.
builder:
arch: amd64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment