implemented compose by url, parse, local yaml.
This commit is contained in:
1 parent
53695f4fff
commit
784fff8faf
218 files changed
+2271
-640
No files matched your search
@@ -5,6 +5,7 @@
|
||||
vars:
|
||||
docker_app_env_template_src: "{{ playbook_dir }}/../roles/ntfy/templates/env.j2"
|
||||
docker_app_compose_template_src: "{{ playbook_dir }}/../roles/ntfy/templates/compose.yaml.j2"
|
||||
docker_app_compose_override_template_src: "{{ playbook_dir }}/../roles/ntfy/templates/compose.override.yaml.j2"
|
||||
docker_app_name: "{{ ntfy_name }}"
|
||||
docker_app_dir: "{{ ntfy_dir }}"
|
||||
docker_app_image: "{{ ntfy_image }}"
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
services:
|
||||
{{ docker_app_name }}: {}
|
||||
|
||||
@@ -17,10 +17,10 @@ services:
|
||||
{% if docker_app_env | length > 0 %}
|
||||
env_file: .env
|
||||
{% endif %}
|
||||
{% if docker_app_routing_mode == "host" and docker_app_ports | length > 0 %}
|
||||
{% if docker_app_routing_mode in ["host", "traefik_file"] and docker_app_ports | length > 0 %}
|
||||
ports:
|
||||
{% for port in docker_app_ports %}
|
||||
- "{{ port.bind | default('0.0.0.0') }}:{{ port.host | default(port.container) }}:{{ port.container }}{% if port.protocol | default('tcp') != 'tcp' %}/{{ port.protocol }}{% endif %}"
|
||||
- "{{ port.bind | default((docker_app_traefik_file_bind_address if docker_app_routing_mode == 'traefik_file' else '0.0.0.0')) }}:{{ port.host | default(port.container) }}:{{ port.container }}{% if port.protocol | default('tcp') != 'tcp' %}/{{ port.protocol }}{% endif %}"
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% if docker_app_routing_mode == "traefik" and docker_app_service_port %}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# Upstream Snapshot
|
||||
|
||||
This directory stores copied upstream reference files for the `ntfy` role.
|
||||
|
||||
See `docs/upstream-sources.yml` for repository URLs, refs, README paths, Compose paths, and verification status.
|
||||
|
||||
Snapshot files are reference material only. Deployments are generated from this role's `templates/` directory.
|
||||
@@ -0,0 +1,28 @@
|
||||
services:
|
||||
ntfy:
|
||||
image: binwiederhier/ntfy
|
||||
container_name: ntfy
|
||||
command:
|
||||
- serve
|
||||
environment:
|
||||
TZ: Etc/London # optional: set desired timezone
|
||||
NTFY_BASE_URL: http://ntfy.internal
|
||||
NTFY_CACHE_FILE: /var/lib/ntfy/cache.db
|
||||
NTFY_AUTH_FILE: /var/lib/ntfy/auth.db
|
||||
NTFY_AUTH_DEFAULT_ACCESS: deny-all
|
||||
NTFY_AUTH_USERS: 'username:base64encodedpassword:admin' # Must escape '$' as '$$'
|
||||
NTFY_BEHIND_PROXY: true
|
||||
NTFY_ATTACHMENT_CACHE_DIR: /var/lib/ntfy/attachments
|
||||
NTFY_ENABLE_LOGIN: true
|
||||
NTFY_UPSTREAM_BASE_URL: https://ntfy.sh
|
||||
volumes:
|
||||
- ./cache/ntfy:/var/cache/ntfy
|
||||
- ./web/ntfy:/etc/ntfy
|
||||
healthcheck: # optional: remember to adapt the host:port to your environment
|
||||
test: ["CMD-SHELL", "wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1"]
|
||||
interval: 60s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
restart: unless-stopped
|
||||
init: true # needed, if healthcheck is used. Prevents zombie processes
|
||||
Reference in new issue
Block a user