Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
docker_notes:diun-ntfy [2024-02-24 Sat wk08 15:01] – baumkp | docker_notes:diun-ntfy [2024-08-24 Sat wk34 22:35] (current) – baumkp | ||
---|---|---|---|
Line 1: | Line 1: | ||
{{tag> | {{tag> | ||
- | ======diun ntfy====== | + | ======Docker - diun & ntfy====== |
ntfy is a notification application and server frame work. It has an iOS client and can also use standard web page and Andiod app. I originally considered gotify however there is not iOS application for this notification system, which basically makes it of less value for me. | ntfy is a notification application and server frame work. It has an iOS client and can also use standard web page and Andiod app. I originally considered gotify however there is not iOS application for this notification system, which basically makes it of less value for me. | ||
Line 8: | Line 8: | ||
=====ntfy===== | =====ntfy===== | ||
+ | nfty was leaving a whole pile of zombie processes, '' | ||
+ | ++++docker-compose.yml| | ||
+ | < | ||
+ | ntfy: | ||
+ | image: binwiederhier/ | ||
+ | init: true | ||
+ | container_name: | ||
+ | command: | ||
+ | serve | ||
+ | environment: | ||
+ | TZ: " | ||
+ | # Use configuration file: config/ | ||
+ | # NTFY_BASE_URL: | ||
+ | # NTFY_CACHE_FILE: | ||
+ | # NTFY_AUTH_FILE: | ||
+ | # NTFY_AUTH_DEFAULT_ACCESS: | ||
+ | # NTFY_BEHIND_PROXY: | ||
+ | # NTFY_ATTACHMENT_CACHE_DIR: | ||
+ | user: 1000:1000 # optional: replace with your own user/group or uid/gid, was UID:GID | ||
+ | volumes: | ||
+ | - ./ | ||
+ | - ./ | ||
+ | ports: | ||
+ | - 8083:80 | ||
+ | healthcheck: | ||
+ | test: [" | ||
+ | interval: 60s | ||
+ | timeout: 10s | ||
+ | retries: 3 | ||
+ | start_period: | ||
+ | restart: unless-stopped</ | ||
+ | ++++ | ||
+ | ntfy configuration is stored ''/ | ||
+ | |||
+ | ++++server.yml| | ||
+ | < | ||
+ | # | ||
+ | # Please refer to the documentation at https:// | ||
+ | # All options also support underscores (_) instead of dashes (-) to comply with the YAML spec. | ||
+ | |||
+ | # Public facing base URL of the service (e.g. https:// | ||
+ | # | ||
+ | # This setting is required for any of the following features: | ||
+ | # - attachments (to return a download URL) | ||
+ | # - e-mail sending (for the topic URL in the email footer) | ||
+ | # - iOS push notifications for self-hosted servers (to calculate the Firebase poll_request topic) | ||
+ | # - Matrix Push Gateway (to validate that the pushkey is correct) | ||
+ | # | ||
+ | base-url: https:// | ||
+ | |||
+ | # Listen address for the HTTP & HTTPS web server. If " | ||
+ | # set " | ||
+ | # | ||
+ | # To listen on all interfaces, you may omit the IP address, e.g. ": | ||
+ | # To disable HTTP, set " | ||
+ | # | ||
+ | # listen-http: | ||
+ | # listen-https: | ||
+ | |||
+ | # Listen on a Unix socket, e.g. / | ||
+ | # This can be useful to avoid port issues on local systems, and to simplify permissions. | ||
+ | # | ||
+ | # listen-unix: | ||
+ | # listen-unix-mode: | ||
+ | |||
+ | # Path to the private key & cert file for the HTTPS web server. Not used if " | ||
+ | # | ||
+ | # key-file: < | ||
+ | # cert-file: < | ||
+ | |||
+ | # If set, also publish messages to a Firebase Cloud Messaging (FCM) topic for your app. | ||
+ | # This is optional and only required to save battery when using the Android app. | ||
+ | # | ||
+ | # firebase-key-file: | ||
+ | |||
+ | # If " | ||
+ | # This allows for service restarts without losing messages in support of the since= parameter. | ||
+ | # | ||
+ | # The " | ||
+ | # before they are deleted. This is required to support the " | ||
+ | # To disable the cache entirely (on-disk/ | ||
+ | # The cache file is created automatically, | ||
+ | # | ||
+ | # The " | ||
+ | # e.g. to enable WAL mode (see https:// | ||
+ | # Example: | ||
+ | # cache-startup-queries: | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # The " | ||
+ | # of messages. If set, messages will be queued and written to the database in batches of the given | ||
+ | # size, or after the given timeout. This is only required for high volume servers. | ||
+ | # | ||
+ | # Debian/RPM package users: | ||
+ | # Use / | ||
+ | # | ||
+ | # | ||
+ | # Check your permissions: | ||
+ | # If you are running ntfy with systemd, make sure this cache file is owned by the | ||
+ | # ntfy user and group by running: chown ntfy.ntfy < | ||
+ | # | ||
+ | cache-file: / | ||
+ | cache-duration: | ||
+ | # cache-startup-queries: | ||
+ | # cache-batch-size: | ||
+ | # cache-batch-timeout: | ||
+ | |||
+ | # If set, access to the ntfy server and API can be controlled on a granular level using | ||
+ | # the 'ntfy user' and 'ntfy access' | ||
+ | # | ||
+ | # - auth-file is the SQLite user/access database; it is created automatically if it doesn' | ||
+ | # - auth-default-access defines the default/ | ||
+ | # set to " | ||
+ | # - auth-startup-queries allows you to run commands when the database is initialized, | ||
+ | # WAL mode. This is similar to cache-startup-queries. See above for details. | ||
+ | # | ||
+ | # Debian/RPM package users: | ||
+ | # Use / | ||
+ | # | ||
+ | # | ||
+ | # Check your permissions: | ||
+ | # If you are running ntfy with systemd, make sure this user database file is owned by the | ||
+ | # ntfy user and group by running: chown ntfy.ntfy < | ||
+ | # | ||
+ | # auth-file: < | ||
+ | # auth-default-access: | ||
+ | # auth-startup-queries: | ||
+ | |||
+ | # If set, the X-Forwarded-For header is used to determine the visitor IP address | ||
+ | # instead of the remote address of the connection. | ||
+ | # | ||
+ | # WARNING: If you are behind a proxy, you must set this, otherwise all visitors are rate limited | ||
+ | # as if they are one. | ||
+ | # | ||
+ | # behind-proxy: | ||
+ | |||
+ | # If enabled, clients can attach files to notifications as attachments. Minimum settings to enable attachments | ||
+ | # are " | ||
+ | # | ||
+ | # - attachment-cache-dir is the cache directory for attached files | ||
+ | # - attachment-total-size-limit is the limit of the on-disk attachment cache directory (total size) | ||
+ | # - attachment-file-size-limit is the per-file attachment size limit (e.g. 300k, 2M, 100M) | ||
+ | # - attachment-expiry-duration is the duration after which uploaded attachments will be deleted (e.g. 3h, 20h) | ||
+ | # | ||
+ | # attachment-cache-dir: | ||
+ | # attachment-total-size-limit: | ||
+ | # attachment-file-size-limit: | ||
+ | # attachment-expiry-duration: | ||
+ | |||
+ | # If enabled, allow outgoing e-mail notifications via the ' | ||
+ | # messages will additionally be sent out as e-mail using an external SMTP server. | ||
+ | # | ||
+ | # As of today, only SMTP servers with plain text auth (or no auth at all), and STARTLS are supported. | ||
+ | # Please also refer to the rate limiting settings below (visitor-email-limit-burst & visitor-email-limit-burst). | ||
+ | # | ||
+ | # - smtp-sender-addr is the hostname: | ||
+ | # - smtp-sender-from is the e-mail address of the sender | ||
+ | # - smtp-sender-user/ | ||
+ | # | ||
+ | # smtp-sender-addr: | ||
+ | # smtp-sender-from: | ||
+ | # smtp-sender-user: | ||
+ | # smtp-sender-pass: | ||
+ | |||
+ | # If enabled, ntfy will launch a lightweight SMTP server for incoming messages. Once configured, users can send | ||
+ | # emails to a topic e-mail address to publish messages to a topic. | ||
+ | # | ||
+ | # - smtp-server-listen defines the IP address and port the SMTP server will listen on, e.g. :25 or 1.2.3.4:25 | ||
+ | # - smtp-server-domain is the e-mail domain, e.g. ntfy.sh | ||
+ | # - smtp-server-addr-prefix is an optional prefix for the e-mail addresses to prevent spam. If set to " | ||
+ | # for instance, only e-mails to ntfy-$topic@ntfy.sh will be accepted. If this is not set, all emails to | ||
+ | # | ||
+ | # | ||
+ | # smtp-server-listen: | ||
+ | # smtp-server-domain: | ||
+ | # smtp-server-addr-prefix: | ||
+ | |||
+ | # Web Push support (background notifications for browsers) | ||
+ | # | ||
+ | # If enabled, allows ntfy to receive push notifications, | ||
+ | # can enable background notifications in the web app. Once enabled, ntfy will forward published messages to the push | ||
+ | # endpoint, which will then forward it to the browser. | ||
+ | # | ||
+ | # You must configure web-push-public/ | ||
+ | # Run "ntfy webpush keys" to generate the keys. | ||
+ | # | ||
+ | # - web-push-public-key is the generated VAPID public key, e.g. AA1234BBCCddvveekaabcdfqwertyuiopasdfghjklzxcvbnm1234567890 | ||
+ | # - web-push-private-key is the generated VAPID private key, e.g. AA2BB1234567890abcdefzxcvbnm1234567890 | ||
+ | # - web-push-file is a database file to keep track of browser subscription endpoints, e.g. `/ | ||
+ | # - web-push-email-address is the admin email address send to the push provider, e.g. `sysadmin@example.com` | ||
+ | # - web-push-startup-queries is an optional list of queries to run on startup` | ||
+ | # | ||
+ | # web-push-public-key: | ||
+ | # web-push-private-key: | ||
+ | # web-push-file: | ||
+ | # web-push-email-address: | ||
+ | # web-push-startup-queries: | ||
+ | |||
+ | # If enabled, ntfy can perform voice calls via Twilio via the " | ||
+ | # | ||
+ | # - twilio-account is the Twilio account SID, e.g. AC12345beefbeef67890beefbeef122586 | ||
+ | # - twilio-auth-token is the Twilio auth token, e.g. affebeef258625862586258625862586 | ||
+ | # - twilio-phone-number is the outgoing phone number you purchased, e.g. +18775132586 | ||
+ | # - twilio-verify-service is the Twilio Verify service SID, e.g. VA12345beefbeef67890beefbeef122586 | ||
+ | # | ||
+ | # twilio-account: | ||
+ | # twilio-auth-token: | ||
+ | # twilio-phone-number: | ||
+ | # twilio-verify-service: | ||
+ | |||
+ | # Interval in which keepalive messages are sent to the client. This is to prevent | ||
+ | # intermediaries closing the connection for inactivity. | ||
+ | # | ||
+ | # Note that the Android app has a hardcoded timeout at 77s, so it should be less than that. | ||
+ | # | ||
+ | # keepalive-interval: | ||
+ | |||
+ | # Interval in which the manager prunes old messages, deletes topics | ||
+ | # and prints the stats. | ||
+ | # | ||
+ | # manager-interval: | ||
+ | |||
+ | # Defines topic names that are not allowed, because they are otherwise used. There are a few default topics | ||
+ | # that cannot be used (e.g. app, account, settings, ...). To extend the default list, define them here. | ||
+ | # | ||
+ | # Example: | ||
+ | # | ||
+ | # - about | ||
+ | # - pricing | ||
+ | # - contact | ||
+ | # | ||
+ | # disallowed-topics: | ||
+ | |||
+ | # Defines the root path of the web app, or disables the web app entirely. | ||
+ | # | ||
+ | # Can be any simple path, e.g. "/", | ||
+ | # the values " | ||
+ | # the web app entirely. | ||
+ | # | ||
+ | # web-root: / | ||
+ | |||
+ | # Various feature flags used to control the web app, and API access, mainly around user and | ||
+ | # account management. | ||
+ | # | ||
+ | # - enable-signup allows users to sign up via the web app, or API | ||
+ | # - enable-login allows users to log in via the web app, or API | ||
+ | # - enable-reservations allows users to reserve topics (if their tier allows it) | ||
+ | # | ||
+ | # enable-signup: | ||
+ | # enable-login: | ||
+ | # enable-reservations: | ||
+ | |||
+ | # Server URL of a Firebase/ | ||
+ | # | ||
+ | # iOS users: | ||
+ | # If you use the iOS ntfy app, you MUST configure this to receive timely notifications. You'll like want this: | ||
+ | upstream-base-url: | ||
+ | # | ||
+ | # If set, all incoming messages will publish a " | ||
+ | # the message ID of the original message, instructing the iOS app to poll this server for the actual message contents. | ||
+ | # This is to prevent the upstream server and Firebase/ | ||
+ | # | ||
+ | # - upstream-base-url is the base URL of the upstream server. Should be " | ||
+ | # - upstream-access-token is the token used to authenticate with the upstream server. This is only required | ||
+ | # if you exceed the upstream rate limits, or the uptream server requires authentication. | ||
+ | # | ||
+ | # upstream-base-url: | ||
+ | # upstream-access-token: | ||
+ | |||
+ | # Configures message-specific limits | ||
+ | # | ||
+ | # - message-size-limit defines the max size of a message body. Please note message sizes >4K are NOT RECOMMENDED, | ||
+ | # and largely untested. If FCM and/or APNS is used, the limit should stay 4K, because their limits are around that size. | ||
+ | # If you increase this size limit regardless, FCM and APNS will NOT work for large messages. | ||
+ | # - message-delay-limit defines the max delay of a message when using the " | ||
+ | # | ||
+ | # message-size-limit: | ||
+ | # message-delay-limit: | ||
+ | |||
+ | # Rate limiting: Total number of topics before the server rejects new topics. | ||
+ | # | ||
+ | # global-topic-limit: | ||
+ | |||
+ | # Rate limiting: Number of subscriptions per visitor (IP address) | ||
+ | # | ||
+ | # visitor-subscription-limit: | ||
+ | |||
+ | # Rate limiting: Allowed GET/ | ||
+ | # - visitor-request-limit-burst is the initial bucket of requests each visitor has | ||
+ | # - visitor-request-limit-replenish is the rate at which the bucket is refilled | ||
+ | # - visitor-request-limit-exempt-hosts is a comma-separated list of hostnames, IPs or CIDRs to be | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # visitor-request-limit-burst: | ||
+ | # visitor-request-limit-replenish: | ||
+ | # visitor-request-limit-exempt-hosts: | ||
+ | |||
+ | # Rate limiting: Hard daily limit of messages per visitor and day. The limit is reset | ||
+ | # every day at midnight UTC. If the limit is not set (or set to zero), the request | ||
+ | # limit (see above) governs the upper limit. | ||
+ | # | ||
+ | # visitor-message-daily-limit: | ||
+ | |||
+ | # Rate limiting: Allowed emails per visitor: | ||
+ | # - visitor-email-limit-burst is the initial bucket of emails each visitor has | ||
+ | # - visitor-email-limit-replenish is the rate at which the bucket is refilled | ||
+ | # | ||
+ | # visitor-email-limit-burst: | ||
+ | # visitor-email-limit-replenish: | ||
+ | |||
+ | # Rate limiting: Attachment size and bandwidth limits per visitor: | ||
+ | # - visitor-attachment-total-size-limit is the total storage limit used for attachments per visitor | ||
+ | # - visitor-attachment-daily-bandwidth-limit is the total daily attachment download/ | ||
+ | # | ||
+ | # visitor-attachment-total-size-limit: | ||
+ | # visitor-attachment-daily-bandwidth-limit: | ||
+ | |||
+ | # Rate limiting: Enable subscriber-based rate limiting (mostly used for UnifiedPush) | ||
+ | # | ||
+ | # If subscriber-based rate limiting is enabled, messages published on UnifiedPush topics** (topics starting with " | ||
+ | # will be counted towards the "rate visitor" | ||
+ | # | ||
+ | # Once enabled, a client subscribing to UnifiedPush topics via HTTP stream, or websockets, will be automatically registered as | ||
+ | # a "rate visitor", | ||
+ | # requires **read-write permission** on the topic. | ||
+ | # | ||
+ | # If this setting is enabled, publishing to UnifiedPush topics will lead to a HTTP 507 response if | ||
+ | # no "rate visitor" | ||
+ | # | ||
+ | # visitor-subscriber-rate-limiting: | ||
+ | |||
+ | # Payments integration via Stripe | ||
+ | # | ||
+ | # - stripe-secret-key is the key used for the Stripe API communication. Setting this values | ||
+ | # | ||
+ | # - stripe-webhook-key is the key required to validate the authenticity of incoming webhooks from Stripe. | ||
+ | # | ||
+ | # - billing-contact is an email address or website displayed in the " | ||
+ | # out with billing questions. If unset, nothing will be displayed. | ||
+ | # | ||
+ | # stripe-secret-key: | ||
+ | # stripe-webhook-key: | ||
+ | # billing-contact: | ||
+ | |||
+ | # Metrics | ||
+ | # | ||
+ | # ntfy can expose Prometheus-style metrics via a /metrics endpoint, or on a dedicated listen IP/port. | ||
+ | # Metrics may be considered sensitive information, | ||
+ | # doing, and/or secure access to the endpoint in your reverse proxy. | ||
+ | # | ||
+ | # - enable-metrics enables the /metrics endpoint for the default ntfy server (i.e. HTTP, HTTPS and/or Unix socket) | ||
+ | # - metrics-listen-http exposes the metrics endpoint via a dedicated [IP]:port. If set, this option implicitly | ||
+ | # | ||
+ | # | ||
+ | # enable-metrics: | ||
+ | # metrics-listen-http: | ||
+ | |||
+ | # Profiling | ||
+ | # | ||
+ | # ntfy can expose Go's net/ | ||
+ | # on a dedicated listen IP/port, which can be accessed via the web browser on http://< | ||
+ | # This can be helpful to expose bottlenecks, | ||
+ | # | ||
+ | # profile-listen-http: | ||
+ | |||
+ | # Logging options | ||
+ | # | ||
+ | # By default, ntfy logs to the console (stderr), with an " | ||
+ | # ntfy supports five different log levels, can also write to a file, log as JSON, and even supports granular | ||
+ | # log level overrides for easier debugging. Some options (log-level and log-level-overrides) can be hot reloaded | ||
+ | # by calling "kill -HUP $pid" or " | ||
+ | # | ||
+ | # - log-format defines the output format, can be " | ||
+ | # - log-file is a filename to write logs to. If this is not set, ntfy logs to stderr. | ||
+ | # - log-level defines the default log level, can be one of " | ||
+ | # Be aware that " | ||
+ | # - log-level-overrides lets you override the log level if certain fields match. This is incredibly powerful | ||
+ | # for debugging certain parts of the system (e.g. only the account management, or only a certain visitor). | ||
+ | # This is an array of strings in the format: | ||
+ | # - " | ||
+ | # - "field -> level" to match any value, e.g. " | ||
+ | # | ||
+ | # | ||
+ | # Check your permissions: | ||
+ | # If you are running ntfy with systemd, make sure this log file is owned by the | ||
+ | # ntfy user and group by running: chown ntfy.ntfy < | ||
+ | # | ||
+ | # Example (good for production): | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # Example level overrides (for debugging, only use temporarily): | ||
+ | # | ||
+ | # - " | ||
+ | # - " | ||
+ | # - " | ||
+ | # | ||
+ | # log-level: info | ||
+ | # log-level-overrides: | ||
+ | # log-format: text | ||
+ | # log-file: / | ||
+ | ++++ | ||
+ | |||
+ | |||
+ | Some links: | ||
+ | *From docs.nfty.sh: | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
=====diun===== | =====diun===== | ||
+ | Some links: | ||
+ | *[[https:// | ||
+ | *[[https:// | ||
<- docker_notes: | <- docker_notes: |