feat(ntfy): add initializer, Kamal accessory container, seed defaults

This commit is contained in:
Min Zeya Phyo
2026-07-28 02:31:48 +08:00
parent 9fa6c37297
commit 20927eea5f
3 changed files with 26 additions and 23 deletions

View File

@@ -35,6 +35,7 @@ registry:
env:
secret:
- RAILS_MASTER_KEY
- NTFY_AUTH_FILE
clear:
# Run the Solid Queue Supervisor inside the web server's Puma process to do jobs.
# When you start using multiple servers, you should split out job processing to a dedicated machine.
@@ -53,6 +54,8 @@ env:
# Log everything from Rails
# RAILS_LOG_LEVEL: debug
NTFY_SERVER_URL: "http://192.168.0.1:8090"
# Aliases are triggered with "bin/kamal <alias>". You can overwrite arguments on invocation:
# "bin/kamal logs -r job" will tail logs from the first server in the job section.
aliases:
@@ -92,25 +95,17 @@ builder:
# user: app
# Use accessory services (secrets come from .kamal/secrets).
# accessories:
# db:
# image: mysql:8.0
# host: 192.168.0.2
# # Change to 3306 to expose port to the world instead of just local network.
# port: "127.0.0.1:3306:3306"
# env:
# clear:
# MYSQL_ROOT_HOST: '%'
# secret:
# - MYSQL_ROOT_PASSWORD
# files:
# - config/mysql/production.cnf:/etc/mysql/my.cnf
# - db/production.sql:/docker-entrypoint-initdb.d/setup.sql
# directories:
# - data:/var/lib/mysql
# redis:
# image: redis:7.0
# host: 192.168.0.2
# port: 6379
# directories:
# - data:/data
accessories:
ntfy:
image: binwiederhier/ntfy:latest
host: 192.168.0.1
port: "127.0.0.1:8090:80"
cmd: serve
env:
clear:
NTFY_BASE_URL: "https://ntfy.app.example.com"
NTFY_LISTEN_HTTP: ":80"
secret:
- NTFY_AUTH_FILE
volumes:
- "ntfy_data:/var/lib/ntfy"

View File

@@ -0,0 +1,4 @@
# ntfy notification server configuration
# Default server URL used when AdminUser.ntfy_server_url is blank.
# In production, set this to your self-hosted ntfy instance.
NTFY_SERVER_URL = ENV.fetch("NTFY_SERVER_URL", "https://ntfy.sh")