update
This commit is contained in:
7
roles/ind/healthcheck/docker-compose.env
Normal file
7
roles/ind/healthcheck/docker-compose.env
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
ALLOWED_HOSTS=healthcheck.local
|
||||||
|
DEFAULT_FROM_EMAIL=healthcheck@homelab.com
|
||||||
|
EMAIL_HOST=stmp@healthcheck.local
|
||||||
|
EMAIL_HOST_PASSWORD=password
|
||||||
|
EMAIL_HOST_USER=user
|
||||||
|
SECRET_KEY=jnweqcrun2409vn8q9p34nf2iunskjdncv
|
||||||
|
SITE_ROOT=http://192.168.0.60
|
||||||
@@ -6,31 +6,29 @@
|
|||||||
|
|
||||||
vars:
|
vars:
|
||||||
docker_compose_definition: |
|
docker_compose_definition: |
|
||||||
services:
|
|
||||||
cronicle:
|
|
||||||
image: ghcr.io/soulteary/cronicle:latest
|
|
||||||
container_name: cronicle
|
|
||||||
hostname: cronicle
|
|
||||||
environment:
|
|
||||||
- TZ=America/Chicago
|
|
||||||
volumes:
|
volumes:
|
||||||
- /etc/localtime:/etc/localtime:ro
|
db-data:
|
||||||
- /etc/timezone:/etc/timezone:ro
|
|
||||||
- ./data/data:/opt/cronicle/data
|
services:
|
||||||
- ./data/logs:/opt/cronicle/logs
|
db:
|
||||||
- ./data/plugins:/opt/cronicle/plugins
|
image: postgres:16
|
||||||
|
volumes:
|
||||||
|
- db-data:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
- POSTGRES_DB=$DB_NAME
|
||||||
|
- POSTGRES_PASSWORD=$DB_PASSWORD
|
||||||
|
web:
|
||||||
|
image: healthchecks/healthchecks:latest
|
||||||
|
env_file:
|
||||||
|
- docker-compose.env
|
||||||
ports:
|
ports:
|
||||||
- 3012:3012
|
- "8000:8000"
|
||||||
restart: unless-stopped
|
# To enable SMTP on port 2525, set SMTPD_PORT=2525 in .env
|
||||||
healthcheck:
|
# and uncomment the following line:
|
||||||
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider localhost:3012/api/app/ping || exit 1"]
|
# - "2525:2525"
|
||||||
interval: 5s
|
depends_on:
|
||||||
timeout: 1s
|
- db
|
||||||
retries: 3
|
command: bash -c 'while !</dev/tcp/db/5432; do sleep 1; done; uwsgi /opt/healthchecks/docker/uwsgi.ini'
|
||||||
logging:
|
|
||||||
driver: "json-file"
|
|
||||||
options:
|
|
||||||
max-size: "10m"
|
|
||||||
|
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
@@ -48,14 +46,14 @@
|
|||||||
|
|
||||||
- name: Setup Service
|
- name: Setup Service
|
||||||
copy:
|
copy:
|
||||||
dest: /etc/systemd/system/cronicle.service
|
dest: /etc/systemd/system/healthcheck.service
|
||||||
content: |
|
content: |
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=cronicle
|
Description=healthcheck
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
User=cronicle
|
User=healthcheck
|
||||||
WorkingDirectory=/home/docker/
|
WorkingDirectory=/home/docker/
|
||||||
ExecStart=docker compose up -d
|
ExecStart=docker compose up -d
|
||||||
Restart=always
|
Restart=always
|
||||||
@@ -75,25 +73,25 @@
|
|||||||
group: docker
|
group: docker
|
||||||
mode: u=rw,g=r,o=r
|
mode: u=rw,g=r,o=r
|
||||||
|
|
||||||
- name: Check if cronicle's data directory exists
|
- name: Check if healthcheck's data directory exists
|
||||||
stat:
|
stat:
|
||||||
path: /data/data
|
path: /data/data
|
||||||
register: cronicle_stat
|
register: healthcheck_stat
|
||||||
|
|
||||||
- name: Restore cronicle Dir
|
- name: Restore healthcheck Dir
|
||||||
shell: |
|
shell: |
|
||||||
restic --password-file /home/restic/.resticpassword -r sftp:misamisa://home/restic/$(hostname) --target / restore latest
|
restic --password-file /home/restic/.resticpassword -r sftp:misamisa://home/restic/$(hostname) --target / restore latest
|
||||||
args:
|
args:
|
||||||
chdir: /home/restic
|
chdir: /home/restic
|
||||||
creates: /data/cronicle
|
creates: /data/healthcheck
|
||||||
when: not cronicle_stat.stat.exists or not cronicle_stat.stat.isdir
|
when: not healthcheck_stat.stat.exists or not healthcheck_stat.stat.isdir
|
||||||
|
|
||||||
- name: Reload systemd daemon
|
- name: Reload systemd daemon
|
||||||
systemd:
|
systemd:
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
|
|
||||||
- name: Start cronicle Service
|
- name: Start healthcheck Service
|
||||||
systemd:
|
systemd:
|
||||||
name: cronicle
|
name: healthcheck
|
||||||
state: started
|
state: started
|
||||||
enabled: yes
|
enabled: yes
|
||||||
2
wikmd.tf
2
wikmd.tf
@@ -1,5 +1,5 @@
|
|||||||
resource "proxmox_lxc" "wikmd" {
|
resource "proxmox_lxc" "wikmd" {
|
||||||
target_node = "pve"
|
target_node = "ryuk"
|
||||||
hostname = "wikmd"
|
hostname = "wikmd"
|
||||||
vmid = 217
|
vmid = 217
|
||||||
ostemplate = "local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst"
|
ostemplate = "local:vztmpl/debian-12-standard_12.7-1_amd64.tar.zst"
|
||||||
|
|||||||
Reference in New Issue
Block a user