refactor: update service configurations and remove deprecated files
Some checks failed
Ansible Lint Check / check-ansible (push) Failing after 29s
Nix Format Check / check-format (push) Failing after 1m33s
Python Lint Check / check-python (push) Failing after 21s

This commit is contained in:
2025-07-20 03:29:05 +02:00
parent a9925a63cc
commit 546e888bdb
7 changed files with 3 additions and 179 deletions

View File

@@ -58,7 +58,7 @@
- name: golink
enabled: true
hosts:
- mennos-cloud-server
- mennos-cachyos-desktop
- name: immich
enabled: true
hosts:

View File

@@ -64,17 +64,6 @@ status.vleeuwen.me status.mvl.sh {
tls {{ caddy_email }}
}
sf.mvl.sh {
import country_block
reverse_proxy seafile:80
handle /seafdav* {
reverse_proxy seafile:8080
}
tls {{ caddy_email }}
}
of.mvl.sh {
import country_block
reverse_proxy onlyoffice:80 {

View File

@@ -3,7 +3,7 @@
block:
- name: Set GoLink directories
ansible.builtin.set_fact:
golink_data_dir: "/mnt/object_storage/services/golink"
golink_data_dir: "/mnt/services/golink"
golink_service_dir: "{{ ansible_env.HOME }}/services/golink"
- name: Create GoLink directories

View File

@@ -3,7 +3,7 @@
block:
- name: Set PrivateBin directories
ansible.builtin.set_fact:
privatebin_data_dir: "{{ '/mnt/services/privatebin' if inventory_hostname == 'mennos-server' else '/mnt/object_storage/services/privatebin' }}"
privatebin_data_dir: "/mnt/services/privatebin"
privatebin_service_dir: "{{ ansible_env.HOME }}/services/privatebin"
- name: Create PrivateBin directories

View File

@@ -1,90 +0,0 @@
services:
db:
image: {{ seafile_db_image | default('mariadb:10.11') }}
container_name: seafile-mysql
environment:
MYSQL_ROOT_PASSWORD: {{ seafile_mysql_root_password | default('ROOT_PASSWORD') }}
MYSQL_USER: {{ seafile_mysql_db_user | default('seafile') }}
MYSQL_PASSWORD: {{ seafile_mysql_db_password | default('PASSWORD') }}
MYSQL_DATABASE: {{ seafile_mysql_db_name | default('seafile') }}
volumes:
- {{ seafile_mysql_volume | default('/opt/seafile-mysql/db') }}:/var/lib/mysql
networks:
- seafile-net
restart: unless-stopped
memcached:
image: {{ seafile_memcached_image | default('memcached:1.6.29') }}
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net
restart: unless-stopped
seafile:
image: {{ seafile_image | default('seafileltd/seafile-mc:12.0-latest') }}
container_name: seafile
environment:
- DB_HOST={{ seafile_mysql_db_host | default('db') }}
- DB_ROOT_PASSWD={{ seafile_mysql_root_password | default('ROOT_PASSWORD') }}
- TIME_ZONE={{ time_zone | default('Europe/Amsterdam') }}
- SEAFILE_ADMIN_EMAIL={{ seafile_admin_email | default('menno@vleeuwen.me') }}
- SEAFILE_ADMIN_PASSWORD={{ seafile_admin_password | default('WIP123') }}
- SEAFILE_SERVER_HOSTNAME={{ seafile_server_hostname | default('sf.mvl.sh') }}
- SEAFILE_SERVER_LETSENCRYPT=false
- SEADRIVE_SERVER_LETSENCRYPT=false
- SEAFILE_SERVER_PROTOCOL={{ seafile_server_protocol | default('http') }}
- JWT_PRIVATE_KEY={{ jwt_private_key | default('') }}
- ENABLE_SEADOC=false
volumes:
- {{ seafile_volume | default('/opt/seafile-data') }}:/shared
networks:
- seafile-net
- caddy_network
ports:
- 8001:80
- 8082:8082
- 8000:8000
restart: unless-stopped
depends_on:
- db
- memcached
notification-server:
image: {{ notification_server_image | default('seafileltd/notification-server:12.0-latest') }}
container_name: notification-server
environment:
- DB_HOST={{ seafile_mysql_db_host | default('db') }}
- DB_ROOT_PASSWD={{ seafile_mysql_root_password | default('ROOT_PASSWORD') }}
- TIME_ZONE={{ time_zone | default('Europe/Amsterdam') }}
volumes:
- {{ notification_server_volume | default('/opt/notification-data') }}:/shared
- {{ seafile_volume | default('/opt/seafile-data') }}:/shared/seafile
networks:
- seafile-net
- caddy_network
depends_on:
- db
- seafile
restart: unless-stopped
onlyoffice:
image: onlyoffice/documentserver:8.3.1.1
restart: unless-stopped
environment:
- JWT_ENABLED=true
- JWT_SECRET={{ jwt_private_key | default('') }}
- WOPI_ENABLED=false
volumes:
- {{ seafile_data_dir }}/onlyoffice/logs:/var/log/onlyoffice
- {{ seafile_data_dir }}/onlyoffice/data:/var/www/onlyoffice/Data
- {{ seafile_data_dir }}/onlyoffice/lib:/var/lib/onlyoffice
networks:
- seafile-net
- caddy_network
networks:
seafile-net:
caddy_network:
external: true
name: caddy_default

View File

@@ -1,75 +0,0 @@
---
- name: Deploy Seafile service
block:
- name: Set Seafile directories
ansible.builtin.set_fact:
seafile_data_dir: "/mnt/object_storage/services/seafile"
seafile_service_dir: "{{ ansible_env.HOME }}/services/seafile"
- name: Set Seafile configuration variables
ansible.builtin.set_fact:
# Docker images
seafile_image: "seafileltd/seafile-mc:12.0-latest"
seafile_db_image: "mariadb:10.11"
seafile_memcached_image: "memcached:1.6.29"
notification_server_image: "seafileltd/notification-server:12.0-latest"
# Volume paths
seafile_volume: "{{ seafile_data_dir }}/seafile-data"
seafile_mysql_volume: "{{ seafile_data_dir }}/seafile-mysql/db"
notification_server_volume: "{{ seafile_data_dir }}/notification-data"
# Database settings
seafile_mysql_db_host: "db"
seafile_mysql_root_password: >
{{ lookup('community.general.onepassword', 'Seafile',
vault='Dotfiles', field='MYSQL_ROOT_PASSWORD') }}
seafile_mysql_db_user: "seafile"
seafile_mysql_db_password: >
{{ lookup('community.general.onepassword', 'Seafile',
vault='Dotfiles', field='MYSQL_PASSWORD') }}
# Server settings
time_zone: "Europe/Amsterdam"
jwt_private_key: >
{{ lookup('community.general.onepassword', 'Seafile',
vault='Dotfiles', field='jwt_private_key') }}
seafile_server_hostname: "sf.mvl.sh"
seafile_server_protocol: "https"
# Admin credentials
seafile_admin_email: "menno@vleeuwen.me"
seafile_admin_password: >
{{ lookup('community.general.onepassword', 'Seafile',
vault='Dotfiles', field='password') }}
- name: Create Seafile directories
ansible.builtin.file:
path: "{{ seafile_dir }}"
state: directory
mode: "0755"
loop:
- "{{ seafile_data_dir }}"
- "{{ seafile_service_dir }}"
- "{{ notification_server_volume }}/logs"
- "{{ seafile_volume }}/logs"
loop_control:
loop_var: seafile_dir
- name: Deploy Seafile configuration files
ansible.builtin.template:
src: docker-compose.yml.j2
dest: "{{ seafile_service_dir }}/docker-compose.yml"
mode: "0644"
register: seafile_configs
- name: Stop Seafile service
ansible.builtin.command: docker compose -f "{{ seafile_service_dir }}/docker-compose.yml" down --remove-orphans
when: seafile_configs.changed
- name: Start Seafile service
ansible.builtin.command: docker compose -f "{{ seafile_service_dir }}/docker-compose.yml" up -d
when: seafile_configs.changed
tags:
- services
- seafile