fix: podman connect
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
---
|
||||
services:
|
||||
ntfy:
|
||||
container_name: ntfy
|
||||
image: {{ ntfy_image }}:{{ ntfy_version }}
|
||||
command:
|
||||
- serve
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- {{ podman_projects_dir }}/ntfy/server.yml:/etc/ntfy/server.yml:ro
|
||||
- {{ ntfy_cache_dir }}:/var/cache/ntfy:rw,Z
|
||||
- {{ ntfy_data_dir }}:/var/lib/ntfy:rw,Z
|
||||
ports:
|
||||
- "{{ ntfy_port }}:80"
|
||||
restart: always
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "wget -q --tries=1 http://localhost:80/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
environment:
|
||||
TZ: {{ ntfy_timezone }}
|
||||
@@ -25,10 +25,10 @@ server {
|
||||
ssl_certificate_key /etc/letsencrypt/live/{{ ntfy_nginx_hostname }}/privkey.pem;
|
||||
|
||||
# SSL configuration
|
||||
ssl_protocols {{ nginx_ssl_protocols }};
|
||||
ssl_prefer_server_ciphers {{ 'on' if nginx_ssl_prefer_server_ciphers else 'off' }};
|
||||
ssl_protocols {{ nginx_ssl_protocols | default('TLSv1.3') }};
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
{% if nginx_log_backend == 'journald' %}
|
||||
{% if nginx_log_backend | default('journald') == 'journald' %}
|
||||
access_log syslog:server=unix:/dev/log,nohostname,tag=nginx_ntfy;
|
||||
error_log syslog:server=unix:/dev/log,nohostname,tag=nginx_ntfy;
|
||||
{% else %}
|
||||
|
||||
@@ -8,9 +8,9 @@ Type=oneshot
|
||||
RemainAfterExit=true
|
||||
User={{ ansible_user }}
|
||||
Group={{ ansible_user }}
|
||||
WorkingDirectory={{ podman_projects_dir }}/ntfy
|
||||
ExecStart=/usr/bin/podman-compose up -d
|
||||
ExecStop=/usr/bin/podman-compose down
|
||||
WorkingDirectory={{ podman_projects_dir | default('/opt/podman') }}/ntfy
|
||||
ExecStart=/usr/bin/podman play kube --replace ntfy.yaml
|
||||
ExecStop=/usr/bin/podman play kube --down ntfy.yaml
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: ntfy
|
||||
labels:
|
||||
app: ntfy
|
||||
spec:
|
||||
containers:
|
||||
- name: server
|
||||
image: {{ ntfy_image }}:{{ ntfy_version }}
|
||||
args:
|
||||
- serve
|
||||
ports:
|
||||
- containerPort: 80
|
||||
hostPort: {{ ntfy_port }}
|
||||
env:
|
||||
- name: TZ
|
||||
value: "{{ ntfy_timezone }}"
|
||||
volumeMounts:
|
||||
- name: localtime
|
||||
mountPath: /etc/localtime
|
||||
readOnly: true
|
||||
- name: ntfy-config
|
||||
mountPath: /etc/ntfy/server.yml
|
||||
readOnly: true
|
||||
- name: ntfy-cache
|
||||
mountPath: /var/cache/ntfy
|
||||
- name: ntfy-data
|
||||
mountPath: /var/lib/ntfy
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /v1/health
|
||||
port: 80
|
||||
initialDelaySeconds: 40
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 10
|
||||
failureThreshold: 3
|
||||
restartPolicy: Always
|
||||
|
||||
volumes:
|
||||
- name: localtime
|
||||
hostPath:
|
||||
path: /etc/localtime
|
||||
type: File
|
||||
- name: ntfy-config
|
||||
hostPath:
|
||||
path: {{ podman_projects_dir | default('/opt/podman') }}/ntfy/server.yml
|
||||
type: File
|
||||
- name: ntfy-cache
|
||||
hostPath:
|
||||
path: {{ ntfy_cache_dir }}
|
||||
type: Directory
|
||||
- name: ntfy-data
|
||||
hostPath:
|
||||
path: {{ ntfy_data_dir }}
|
||||
type: Directory
|
||||
Reference in New Issue
Block a user