replace partkeepr with partsy, make private

This commit is contained in:
Bastian de Byl
2025-10-21 16:40:56 -04:00
parent 812b5b30a1
commit 37c7259cf7
5 changed files with 128 additions and 70 deletions

View File

@@ -11,6 +11,7 @@ hass_path: "{{ podman_volumes }}/hass"
# nginx_path: removed - nginx no longer used # nginx_path: removed - nginx no longer used
nosql_path: "{{ podman_volumes }}/nosql" nosql_path: "{{ podman_volumes }}/nosql"
partkeepr_path: "{{ podman_volumes }}/partkeepr" partkeepr_path: "{{ podman_volumes }}/partkeepr"
partsy_path: "{{ podman_volumes }}/partsy"
photos_path: "{{ podman_volumes }}/photos" photos_path: "{{ podman_volumes }}/photos"
pihole_path: "{{ podman_volumes }}/pihole" pihole_path: "{{ podman_volumes }}/pihole"
sshpass_cron_path: "{{ podman_volumes }}/sshpass_cron" sshpass_cron_path: "{{ podman_volumes }}/sshpass_cron"

View File

@@ -1,66 +1,59 @@
--- ---
- name: create required partkeepr volumes # PartKeepr has been replaced by Partsy
# This playbook removes PartKeepr containers and services
# Keeping MySQL data volume for historical reference only
- name: stop and remove partkeepr container
become: true
become_user: "{{ podman_user }}"
containers.podman.podman_container:
name: partkeepr
state: absent
- name: stop and remove partkeepr-db container
become: true
become_user: "{{ podman_user }}"
containers.podman.podman_container:
name: partkeepr-db
state: absent
- name: remove systemd service for partkeepr
become: true
ansible.builtin.systemd:
name: "podman-partkeepr.service"
state: stopped
enabled: false
daemon_reload: true
ignore_errors: true
- name: remove systemd service for partkeepr-db
become: true
ansible.builtin.systemd:
name: "podman-partkeepr-db.service"
state: stopped
enabled: false
daemon_reload: true
ignore_errors: true
- name: remove systemd service files for partkeepr
become: true become: true
ansible.builtin.file: ansible.builtin.file:
path: "{{ item }}" path: "{{ item }}"
state: absent
loop:
- "/etc/systemd/system/podman-partkeepr.service"
- "/etc/systemd/system/podman-partkeepr-db.service"
notify: systemd daemon-reload
- name: preserve partkeepr mysql data volume for history
become: true
ansible.builtin.file:
path: "{{ partkeepr_path }}/mysql"
state: directory state: directory
owner: "{{ podman_subuid.stdout }}" owner: "{{ podman_subuid.stdout }}"
group: "{{ podman_user }}" group: "{{ podman_user }}"
mode: 0755 mode: 0755
notify: restorecon podman notify: restorecon podman
loop:
- "{{ partkeepr_path }}/mysql"
- name: flush handlers - name: flush handlers
ansible.builtin.meta: flush_handlers ansible.builtin.meta: flush_handlers
- import_tasks: podman/podman-check.yml
vars:
container_name: partkeepr-db
container_image: "{{ db_image }}"
- name: create partkeepr-db container
become: true
become_user: "{{ podman_user }}"
containers.podman.podman_container:
name: partkeepr-db
image: "{{ db_image }}"
restart_policy: on-failure:3
log_driver: journald
network:
- shared
env:
MYSQL_RANDOM_ROOT_PASSWORD: "yes"
MYSQL_DATABASE: partkeepr
MYSQL_USER: partkeepr
MYSQL_PASSWORD: "{{ partkeepr_mysql_password }}"
volumes:
- "{{ partkeepr_path }}/mysql:/var/lib/mysql"
- name: create systemd startup job for partkeepr-db
include_tasks: podman/systemd-generate.yml
vars:
container_name: partkeepr-db
- import_tasks: podman/podman-check.yml
vars:
container_name: partkeepr
container_image: "{{ image }}"
- name: create partkeepr container
become: true
become_user: "{{ podman_user }}"
containers.podman.podman_container:
name: partkeepr
image: "{{ image }}"
restart_policy: on-failure:3
log_driver: journald
network:
- shared
ports:
- "8081:80"
- name: create systemd startup job for partkeepr
include_tasks: podman/systemd-generate.yml
vars:
container_name: partkeepr

View File

@@ -0,0 +1,49 @@
---
- name: create partsy host directory volumes
become: true
ansible.builtin.file:
path: "{{ item }}"
state: directory
owner: "{{ podman_subuid.stdout }}"
group: "{{ podman_user }}"
mode: 0777
notify: restorecon podman
loop:
- "{{ partsy_path }}/data"
- "{{ partsy_path }}/backups"
- name: flush handlers
ansible.builtin.meta: flush_handlers
- import_tasks: podman/podman-check.yml
vars:
container_name: partsy
container_image: "{{ image }}"
- name: create partsy container
become: true
become_user: "{{ podman_user }}"
containers.podman.podman_container:
name: partsy
image: "{{ image }}"
restart_policy: on-failure:3
log_driver: journald
network:
- shared
env:
PARTSY_MODE: development
PARTSY_DATA_DIR: /data
PARTSY_BACKUP_DIR: /backups
PARTSY_PORT: "8080"
PARTSY_STATIC_DIR: /app/static
LOG_LEVEL: info
volumes:
- "{{ partsy_path }}/data:/data"
- "{{ partsy_path }}/backups:/backups"
ports:
- "8081:8080"
- name: create systemd startup job for partsy
include_tasks: podman/systemd-generate.yml
vars:
container_name: partsy

View File

@@ -40,18 +40,23 @@
image: docker.io/bdebyl/partkeepr:0.1.10 image: docker.io/bdebyl/partkeepr:0.1.10
tags: partkeepr tags: partkeepr
- import_tasks: containers/home/partsy.yml
vars:
image: localhost/partsy:b8e4e92-dirty
tags: partsy
- import_tasks: containers/skudak/wiki.yml - import_tasks: containers/skudak/wiki.yml
vars: vars:
db_image: docker.io/library/mysql:5.7.21 db_image: docker.io/library/mysql:5.7.21
image: docker.io/solidnerd/bookstack:25.5 image: docker.io/solidnerd/bookstack:25.7
tags: skudak, skudak-wiki tags: skudak, skudak-wiki
- import_tasks: containers/home/photos.yml - import_tasks: containers/home/photos.yml
vars: vars:
db_image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 db_image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
ml_image: ghcr.io/immich-app/immich-machine-learning:v1.142.1 ml_image: ghcr.io/immich-app/immich-machine-learning:v2.1.0
redis_image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8 redis_image: docker.io/redis:6.2-alpine@sha256:eaba718fecd1196d88533de7ba49bf903ad33664a92debb24660a922ecd9cac8
image: ghcr.io/immich-app/immich-server:v1.142.1 image: ghcr.io/immich-app/immich-server:v2.1.0
tags: photos tags: photos
- import_tasks: containers/home/cloud.yml - import_tasks: containers/home/cloud.yml
@@ -68,10 +73,15 @@
- import_tasks: containers/debyltech/fulfillr.yml - import_tasks: containers/debyltech/fulfillr.yml
vars: vars:
image: "{{ aws_ecr_endpoint }}/fulfillr:20250916.1905" image: "{{ aws_ecr_endpoint }}/fulfillr:20251003.1533"
tags: debyltech, fulfillr tags: debyltech, fulfillr
- import_tasks: containers/home/nosql.yml - import_tasks: containers/home/nosql.yml
vars: vars:
image: docker.io/redis:7.2.1-alpine image: docker.io/redis:7.2.1-alpine
tags: nosql tags: nosql
- import_tasks: containers/home/gregtime.yml
vars:
image: docker.io/library/greg-time-bot:1.0.1
tags: gregtime

View File

@@ -73,16 +73,6 @@
} }
} }
# Parts/PartKeepr - {{ parts_server_name }}
{{ parts_server_name }} {
import common_headers
reverse_proxy localhost:8081
log {
output file /var/log/caddy/parts.log
format json
}
}
# Wiki/BookStack - {{ bookstack_server_name }} # Wiki/BookStack - {{ bookstack_server_name }}
{{ bookstack_server_name }} { {{ bookstack_server_name }} {
@@ -134,6 +124,21 @@
} }
} }
# Parts/Partsy - {{ parts_server_name }}
{{ parts_server_name }} {
{{ ip_restricted_site() }}
handle @local {
import common_headers
reverse_proxy localhost:8081
}
log {
output file /var/log/caddy/parts.log
format json
}
}
# ============================================================================ # ============================================================================
# COMPLEX CONFIGURATIONS # COMPLEX CONFIGURATIONS
# ============================================================================ # ============================================================================