From 0db23918dafcab72ef098dbb2bd26a764e180852 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 20 Jun 2023 22:43:11 +0200 Subject: [PATCH 01/14] updated nextcloud update instruction and set libreoffice to more conservative version --- roles/pc_application-libreoffice/tasks/main.yml | 4 ++-- roles/server_docker-nextcloud/README.md | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/roles/pc_application-libreoffice/tasks/main.yml b/roles/pc_application-libreoffice/tasks/main.yml index 5a7d15a7..05a00077 100644 --- a/roles/pc_application-libreoffice/tasks/main.yml +++ b/roles/pc_application-libreoffice/tasks/main.yml @@ -2,11 +2,11 @@ community.general.pacman: name: - ttf-liberation - - libreoffice-fresh + - libreoffice-still state: present - name: install libreoffice language packages community.general.pacman: - name: "libreoffice-fresh-{{ item }}" + name: "libreoffice-still-{{ item }}" state: present loop: "{{libreoffice_languages}}" diff --git a/roles/server_docker-nextcloud/README.md b/roles/server_docker-nextcloud/README.md index 0a1e285d..4074da3c 100644 --- a/roles/server_docker-nextcloud/README.md +++ b/roles/server_docker-nextcloud/README.md @@ -12,11 +12,10 @@ NEXTCLOUD_APPLICATION_DOCKER_CONTAINER=nextcloud-application-1 To update the nextcloud container execute the following commands on the server: ```bash - docker exec -it -u www-data $NEXTCLOUD_APPLICATION_DOCKER_CONTAINER /var/www/html/occ maintenance:mode --on - sudo python {{path_administrator_scripts}}docker-volume-backup/docker-volume-backup.py - export COMPOSE_HTTP_TIMEOUT=600 - export DOCKER_CLIENT_TIMEOUT=600 - cd {{path_docker_compose_files}}nextcloud && docker-compose down + docker exec -it -u www-data $NEXTCLOUD_APPLICATION_DOCKER_CONTAINER /var/www/html/occ maintenance:mode --on && + export COMPOSE_HTTP_TIMEOUT=600 && + export DOCKER_CLIENT_TIMEOUT=600 && + docker-compose down ``` Afterwards update the ***nextcloud_version*** variable to the next version and run the this repository with this ansible role. From c551df6f9390857c778a481c2708d586b30c1dcc Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 20 Jun 2023 22:52:02 +0200 Subject: [PATCH 02/14] added correct user to execute yay --- roles/pc_collection-video-conference/tasks/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/pc_collection-video-conference/tasks/main.yml b/roles/pc_collection-video-conference/tasks/main.yml index baf2e7f0..8438bce5 100644 --- a/roles/pc_collection-video-conference/tasks/main.yml +++ b/roles/pc_collection-video-conference/tasks/main.yml @@ -2,4 +2,5 @@ kewlfft.aur.aur: use: yay name: - - zoom \ No newline at end of file + - zoom + become: false \ No newline at end of file From 5582abf1fbdffba8af3a9aaed2562a09e417b8c1 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 20 Jun 2023 23:43:38 +0200 Subject: [PATCH 03/14] deactivated not functioning code --- roles/pc_collection-bluray-player/tasks/main.yml | 14 +++++++------- roles/pc_driver-epson-multiprinter/tasks/main.yml | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/roles/pc_collection-bluray-player/tasks/main.yml b/roles/pc_collection-bluray-player/tasks/main.yml index ce6460d9..389d9c8e 100644 --- a/roles/pc_collection-bluray-player/tasks/main.yml +++ b/roles/pc_collection-bluray-player/tasks/main.yml @@ -5,10 +5,10 @@ - libaacs - libbluray state: present -- name: install AUR packages to play blu ray - kewlfft.aur.aur: - use: yay - name: - - aacskeys - - libbdplus - become: false +#- name: install AUR packages to play blu ray +# kewlfft.aur.aur: +# use: yay +# name: +# - aacskeys +# - libbdplus +# become: false diff --git a/roles/pc_driver-epson-multiprinter/tasks/main.yml b/roles/pc_driver-epson-multiprinter/tasks/main.yml index 4e9d66e9..b95db18f 100644 --- a/roles/pc_driver-epson-multiprinter/tasks/main.yml +++ b/roles/pc_driver-epson-multiprinter/tasks/main.yml @@ -6,6 +6,7 @@ - imagescan-plugin-networkscan - epson-inkjet-printer-escpr - epson-inkjet-printer-escpr2 + become: false - name: install imagescan community.general.pacman: name: imagescan From 9a2f5877f4935a511eca41c6ebdc732e3ff4e439 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 21 Jun 2023 12:56:28 +0200 Subject: [PATCH 04/14] Changed mysql to mariadb --- roles/server_docker-attendize/templates/docker-compose.yml.j2 | 2 +- roles/server_docker-gitea/templates/docker-compose.yml.j2 | 2 +- roles/server_docker-mailu/templates/docker-compose.yml.j2 | 2 +- roles/server_docker-nextcloud/templates/docker-compose.yml.j2 | 2 +- roles/server_docker-pixelfed/templates/docker-compose.yml.j2 | 2 +- roles/server_docker-wordpress/templates/docker-compose.yml.j2 | 2 +- roles/server_docker-yourls/templates/docker-compose.yml.j2 | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/server_docker-attendize/templates/docker-compose.yml.j2 b/roles/server_docker-attendize/templates/docker-compose.yml.j2 index 8b8ea942..1af999f3 100644 --- a/roles/server_docker-attendize/templates/docker-compose.yml.j2 +++ b/roles/server_docker-attendize/templates/docker-compose.yml.j2 @@ -38,7 +38,7 @@ services: volumes: - database:/var/lib/mysql healthcheck: - test: "/usr/bin/mysql --user=attendize --password={{attendize_database_password}} --execute \"SHOW DATABASES;\"" + test: "/usr/bin/mariadb --user=attendize --password={{attendize_database_password}} --execute \"SHOW DATABASES;\"" interval: 3s timeout: 1s retries: 5 diff --git a/roles/server_docker-gitea/templates/docker-compose.yml.j2 b/roles/server_docker-gitea/templates/docker-compose.yml.j2 index 890b7e0b..d6b911f6 100644 --- a/roles/server_docker-gitea/templates/docker-compose.yml.j2 +++ b/roles/server_docker-gitea/templates/docker-compose.yml.j2 @@ -45,7 +45,7 @@ services: volumes: - database:/var/lib/mysql healthcheck: - test: "/usr/bin/mysql --user=gitea --password={{gitea_database_password}} --execute \"SHOW DATABASES;\"" + test: "/usr/bin/mariadb --user=gitea --password={{gitea_database_password}} --execute \"SHOW DATABASES;\"" interval: 3s timeout: 1s retries: 5 diff --git a/roles/server_docker-mailu/templates/docker-compose.yml.j2 b/roles/server_docker-mailu/templates/docker-compose.yml.j2 index d35b882d..5df9cb94 100644 --- a/roles/server_docker-mailu/templates/docker-compose.yml.j2 +++ b/roles/server_docker-mailu/templates/docker-compose.yml.j2 @@ -33,7 +33,7 @@ services: volumes: - database:/var/lib/mysql healthcheck: - test: "/usr/bin/mysql --user=mailu --password={{mailu_database_password}} --execute \"SHOW DATABASES;\"" + test: "/usr/bin/mariadb --user=mailu --password={{mailu_database_password}} --execute \"SHOW DATABASES;\"" interval: 3s timeout: 1s retries: 5 diff --git a/roles/server_docker-nextcloud/templates/docker-compose.yml.j2 b/roles/server_docker-nextcloud/templates/docker-compose.yml.j2 index 106780c1..f9dc1253 100644 --- a/roles/server_docker-nextcloud/templates/docker-compose.yml.j2 +++ b/roles/server_docker-nextcloud/templates/docker-compose.yml.j2 @@ -30,7 +30,7 @@ services: - database:/var/lib/mysql restart: always healthcheck: - test: "/usr/bin/mysql --user=nextcloud --password={{nextcloud_database_password}} --execute \"SHOW DATABASES;\"" + test: "/usr/bin/mariadb --user=nextcloud --password={{nextcloud_database_password}} --execute \"SHOW DATABASES;\"" interval: 3s timeout: 1s retries: 5 diff --git a/roles/server_docker-pixelfed/templates/docker-compose.yml.j2 b/roles/server_docker-pixelfed/templates/docker-compose.yml.j2 index 239830b9..28c083e1 100644 --- a/roles/server_docker-pixelfed/templates/docker-compose.yml.j2 +++ b/roles/server_docker-pixelfed/templates/docker-compose.yml.j2 @@ -46,7 +46,7 @@ services: volumes: - database:/var/lib/mysql healthcheck: - test: "/usr/bin/mysql --user=pixelfed --password={{pixelfed_database_password}} --execute \"SHOW DATABASES;\"" + test: "/usr/bin/mariadb --user=pixelfed --password={{pixelfed_database_password}} --execute \"SHOW DATABASES;\"" interval: 3s timeout: 1s retries: 5 diff --git a/roles/server_docker-wordpress/templates/docker-compose.yml.j2 b/roles/server_docker-wordpress/templates/docker-compose.yml.j2 index f415e36d..689c16c1 100644 --- a/roles/server_docker-wordpress/templates/docker-compose.yml.j2 +++ b/roles/server_docker-wordpress/templates/docker-compose.yml.j2 @@ -33,7 +33,7 @@ services: volumes: - database:/var/lib/mysql healthcheck: - test: "/usr/bin/mysql --user=wordpress --password={{wordpress_database_password}} --execute \"SHOW DATABASES;\"" + test: "/usr/bin/mariadb --user=wordpress --password={{wordpress_database_password}} --execute \"SHOW DATABASES;\"" interval: 3s timeout: 1s retries: 5 diff --git a/roles/server_docker-yourls/templates/docker-compose.yml.j2 b/roles/server_docker-yourls/templates/docker-compose.yml.j2 index 0c0c21c4..4f0a7cc5 100644 --- a/roles/server_docker-yourls/templates/docker-compose.yml.j2 +++ b/roles/server_docker-yourls/templates/docker-compose.yml.j2 @@ -34,7 +34,7 @@ services: volumes: - database:/var/lib/mysql healthcheck: - test: "/usr/bin/mysql --user=yourls --password={{yourls_database_password}} --execute \"SHOW DATABASES;\"" + test: "/usr/bin/mariadb --user=yourls --password={{yourls_database_password}} --execute \"SHOW DATABASES;\"" interval: 3s timeout: 1s retries: 5 From 48c82dd6f66775ee23a93c9eccc1991e8dd965df Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 27 Jun 2023 14:36:07 +0200 Subject: [PATCH 05/14] Updated docu for epson installation --- roles/pc_driver-epson-multiprinter/Readme.md | 5 +++-- roles/pc_driver-epson-multiprinter/files/utsushi.conf | 10 ++++++++++ roles/pc_driver-epson-multiprinter/tasks/main.yml | 2 +- roles/server_docker-pixelfed/README.md | 5 +++++ 4 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 roles/pc_driver-epson-multiprinter/files/utsushi.conf diff --git a/roles/pc_driver-epson-multiprinter/Readme.md b/roles/pc_driver-epson-multiprinter/Readme.md index 2b87ffb0..bd7bedc0 100644 --- a/roles/pc_driver-epson-multiprinter/Readme.md +++ b/roles/pc_driver-epson-multiprinter/Readme.md @@ -3,7 +3,8 @@ - https://bernhardsteindl.at/epson-ecotank-et-3600-unter-arch-linux-einrichten/ - http://download.ebz.epson.net/dsc/search/01/search/searchModule - https://aur.archlinux.org/packages/epson-inkjet-printer-escpr -- https://forum.manjaro.org/t/probleme-mit-epson-et-2820/109777/2 +- https://forum.manjaro.org/t/probleme-mit-epson-et-2820/109777 - https://www.ordinatechnic.com/distribution-specific-guides/Arch/installing-an-epson-multifunction-printer-on-arch-linux-and-derivatives - http://localhost:631/admin -- https://wiki.archlinux.org/title/SANE/Scanner-specific_problems \ No newline at end of file +- https://wiki.archlinux.org/title/SANE/Scanner-specific_problems +- https://wiki.archlinux.org/title/SANE \ No newline at end of file diff --git a/roles/pc_driver-epson-multiprinter/files/utsushi.conf b/roles/pc_driver-epson-multiprinter/files/utsushi.conf new file mode 100644 index 00000000..4b7aba61 --- /dev/null +++ b/roles/pc_driver-epson-multiprinter/files/utsushi.conf @@ -0,0 +1,10 @@ +# Bus 003 Device 089: ID 04b8:1186 Seiko Epson Corp. ET-2820 Series +[devices] +dev1.udi = esci:usb:04b8:1186 +dev1.name = EPSON ET-2821 USB +dev1.model = ET-2821 + +myscanner.udi = esci:networkscan://192.168.0.181:1865 +myscanner.name = EPSON ET-2821 Network +myscanner.vendor = Epson +myscanner.model = ET-2821 \ No newline at end of file diff --git a/roles/pc_driver-epson-multiprinter/tasks/main.yml b/roles/pc_driver-epson-multiprinter/tasks/main.yml index b95db18f..6dbff4c6 100644 --- a/roles/pc_driver-epson-multiprinter/tasks/main.yml +++ b/roles/pc_driver-epson-multiprinter/tasks/main.yml @@ -4,7 +4,7 @@ name: - epson-printer-utility - imagescan-plugin-networkscan - - epson-inkjet-printer-escpr + #- epson-inkjet-printer-escpr - epson-inkjet-printer-escpr2 become: false - name: install imagescan diff --git a/roles/server_docker-pixelfed/README.md b/roles/server_docker-pixelfed/README.md index 5c6c4f3c..63d68a8f 100644 --- a/roles/server_docker-pixelfed/README.md +++ b/roles/server_docker-pixelfed/README.md @@ -1,5 +1,10 @@ # role server_docker-pixelfed +## Go into application container +```bash +sudo docker-compose exec -it application bash +``` + ## hard cleanup ```bash docker-compose down From 153c8ce1bb97f6ef166d522b34edd9f004a1097b Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 29 Jun 2023 14:29:58 +0200 Subject: [PATCH 06/14] Added testing links --- roles/server_docker-mailu/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/server_docker-mailu/README.md b/roles/server_docker-mailu/README.md index d9be98ca..e5d8c005 100644 --- a/roles/server_docker-mailu/README.md +++ b/roles/server_docker-mailu/README.md @@ -79,6 +79,10 @@ sudo docker restart mailu_smtp_1 mailu_imap_1 mailu_antispam_1 mailu_redis_1 mai docker-compose exec -it smtp postqueue -f ``` +## test +- https://de.ssl-tools.net/mailservers/ +- http://testemail.de/ + ## update For update instructions follow: - https://mailu.io/master/maintain.html From 11996375f307e68a9e30aa5dbd5b8b4ab6bfeeca Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 29 Jun 2023 14:41:16 +0200 Subject: [PATCH 07/14] Optimized README.md with Chat-GPT --- roles/server_docker-mailu/README.md | 170 +++++++++++++++++----------- 1 file changed, 106 insertions(+), 64 deletions(-) diff --git a/roles/server_docker-mailu/README.md b/roles/server_docker-mailu/README.md index e5d8c005..54d0f8ed 100644 --- a/roles/server_docker-mailu/README.md +++ b/roles/server_docker-mailu/README.md @@ -1,103 +1,145 @@ -# role server_docker-mailu +# Mailu Server Docker Role -## setup -### bugs +This guide provides instructions for setting up, operating, and maintaining the Mailu server docker role. -#### fetchmail -Fetchmail doesn't work with big amounts of data. -For further information see this issue: https://github.com/Mailu/Mailu/issues/1719. +## Table of Contents -##### deactivation -If you have fetchmail installed and want to deinstall it keep in mind to delete all fetched accounts from the administration panel before you delete fetchmail. +- [Setup](#setup) + - [Fetchmail Issues](#fetchmail-issues) + - [Data Deletion](#data-deletion) + - [Port Management](#port-management) + - [Admin Account Creation](#admin-account-creation) + - [CLI User Management](#cli-user-management) + - [Starting the Server](#starting-the-server) +- [Debugging](#debugging) +- [Testing](#testing) +- [Updates](#updates) +- [To-Do](#to-do) +- [References](#references) -##### security concerns -The [german wikipedia tells that there are some security concern with fetchmail](https://de.wikipedia.org/wiki/Fetchmail). If in the future a customer needs to functions of fetchmail, it could be better to write a docker container for [getmail](https://en.wikipedia.org/wiki/Getmail) instead because it should be more secure. +## Setup -##### workaround -If you need to receive emails from another account this should help: +### Fetchmail Issues -- Redirect to your new email account -- Export all data from your original account -- Import all data from your original account to your new account +Fetchmail might not work properly with large amounts of data. For more information, refer to this [issue](https://github.com/Mailu/Mailu/issues/1719). -### delete data -To delete all volumes and data execute: +#### Deactivating Fetchmail + +Before uninstalling Fetchmail, ensure to remove all fetched accounts from the administration panel. + +#### Fetchmail Security Concerns + +There are known security concerns with Fetchmail as stated in the [German Wikipedia](https://de.wikipedia.org/wiki/Fetchmail). If you require Fetchmail functions in the future, consider creating a Docker container for [Getmail](https://en.wikipedia.org/wiki/Getmail) as it is considered more secure. + +#### Fetchmail Workaround + +If you need to receive emails from another account, follow these steps: + +1. Redirect your emails to your new email account. +2. Export all data from your original account. +3. Import all data to your new account. + +### Data Deletion + +To delete all volumes and data, execute the following command with caution: ```bash - rm -vr /etc/mailu/; docker volume rm $(docker volume ls -q | grep mailu_) +rm -vr /etc/mailu/; docker volume rm $(docker volume ls -q | grep mailu_) ``` -Be careful! -### ports -Keep in mind to change the conflicting ports manual. -Execute +### Port Management + +Check for any port conflicts and manually change the conflicting ports if necessary. Use the following command to verify: ```bash - netstat -tulpn +netstat -tulpn ``` -to verify that there aren't port conflicts +### Admin Account Creation -### admin account - -Before you can use Mailu, you must create the primary administrator user account. This should be admin@{{hostname}}. Use the following command, changing PASSWORD to your liking: +To use Mailu, create the primary administrator user account, `admin@{{hostname}}`, using the command below. Replace `PASSWORD` with your preferred password: ```bash - docker-compose -p mailu exec admin flask mailu admin {{admin}} {{hostname}} PASSWORD +docker-compose -p mailu exec admin flask mailu admin {{admin}} {{hostname}} PASSWORD ``` -### cli user management -How to manage users is described here: https://mailu.io/master/cli.html +### CLI User Management -### Up +For managing users, follow the instructions in the official [Mailu CLI documentation](https://mailu.io/master/cli.html). + +### Starting the Server + +To start the server, use the following command: ```bash - docker-compose -p mailu up -d -``` -## debug - -## database -### database access -To access the database execute -```bash - docker exec -it mailu-database-1 mysql -u root -D mailu -p +docker-compose -p mailu up -d ``` -### mailu_front_1 +## Debugging + +### Database Access + +To access the database, use the following command: ```bash -sudo docker container exec -it mailu_front_1 /bin/bash +docker-compose exec -it database mysql -u root -D mailu -p ``` -### restart everything + +### Container Access + +To access the front container, use this command: ```bash -sudo docker restart mailu_smtp_1 mailu_imap_1 mailu_antispam_1 mailu_redis_1 mailu_webdav_1 mailu_front_1 mailu_database_1 mailu_webmail_1 mailu_admin_1 mailu_antivirus_1 +docker-compose exec -it front /bin/bash ``` -## resend queued mails +### Restarting Services + +To restart all services, use the following command: + +```bash +docker-compose restart +``` + +### Resending Queued Mails + +To resend queued mails, use this command: + ```bash docker-compose exec -it smtp postqueue -f ``` -## test -- https://de.ssl-tools.net/mailservers/ -- http://testemail.de/ +## Testing -## update -For update instructions follow: -- https://mailu.io/master/maintain.html +Use the following tools for testing: -## todo -- https://blog.kuepper.nrw/2019/03/30/roundcube-webmail-mit-zwei-faktor-authentifizierung/ -- https://mailu.io/master/faq.html#i-want-to-integrate-nextcloud-15-and-newer-with-mailu -- https://docs.nextcloud.com/server/9.0/admin_manual/configuration_user/user_auth_ftp_smb_imap.html -## See -- https://gist.github.com/marienfressinaud/f284a59b18aad395eb0de2d22836ae6b -- https://mailu.io/1.7/compose/setup.html -- https://github.com/nuxsmin/sysPass/issues/1299 -- https://github.com/Mailu/Mailu/issues/1171 -- https://support.plesk.com/hc/en-us/articles/115001264814-Unable-to-log-into-RoundCube-Connection-to-storage-server-failed -- https://github.com/Mailu/Mailu -- https://github.com/Mailu/Mailu/issues/2135 -- https://github.com/Mailu/Mailu/issues/2827 \ No newline at end of file + +- SSL-Tools Mailserver Test (URL: https://de.ssl-tools.net/mailservers/) +- TestEmail.de (URL: http://testemail.de/) + +## Updates + +For instructions on updating your Mailu setup, follow the official [Mailu maintenance guide](https://mailu.io/master/maintain.html). + +## To-Do + +- Implement two-factor authentication in Roundcube Webmail. More information can be found [here](https://blog.kuepper.nrw/2019/03/30/roundcube-webmail-mit-zwei-faktor-authentifizierung/). +- Integrate Nextcloud 15 and newer with Mailu. Learn more about this [here](https://mailu.io/master/faq.html#i-want-to-integrate-nextcloud-15-and-newer-with-mailu). +- User authentication with Nextcloud. Find more information [here](https://docs.nextcloud.com/server/9.0/admin_manual/configuration_user/user_auth_ftp_smb_imap.html). + +## References + +- [Mailu compose setup guide](https://mailu.io/1.7/compose/setup.html) +- [SysPass issue #1299](https://github.com/nuxsmin/sysPass/issues/1299) +- [Mailu issue #1719](https://github.com/Mailu/Mailu/issues/1719) +- [Mailu issue #1171](https://github.com/Mailu/Mailu/issues/1171) +- [Mailu issue #2135](https://github.com/Mailu/Mailu/issues/2135) +- [Mailu issue #2827](https://github.com/Mailu/Mailu/issues/2827) +- [Mailu GitHub repository](https://github.com/Mailu/Mailu) +- [Plesk support article on RoundCube connection issue](https://support.plesk.com/hc/en-us/articles/115001264814-Unable-to-log-into-RoundCube-Connection-to-storage-server-failed) +- [Gist by marienfressinaud](https://gist.github.com/marienfressinaud/f284a59b18aad395eb0de2d22836ae6b) + +For more information about this role, visit the [GitHub repository](https://github.com/kevinveenbirkenbach/computer-playbook/tree/master/roles/server_docker-mailu). + +This README.md was optimized with [Chat-GPT](https://chat.openai.com/share/d1ad5ce7-3aa1-4a14-a959-63393b39374a) \ No newline at end of file From 3ea28905fc9efe96855747bb034f530cc742fd06 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 29 Jun 2023 14:49:21 +0200 Subject: [PATCH 08/14] Optimized pixelfed README.md file --- roles/server_docker-pixelfed/README.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/roles/server_docker-pixelfed/README.md b/roles/server_docker-pixelfed/README.md index 63d68a8f..b90f4909 100644 --- a/roles/server_docker-pixelfed/README.md +++ b/roles/server_docker-pixelfed/README.md @@ -1,8 +1,28 @@ # role server_docker-pixelfed -## Go into application container +## access application ```bash -sudo docker-compose exec -it application bash +docker-compose exec -it application bash +``` + +## access database +```bash +docker-compose exec -it database mariadb -u pixelfed -p +``` + +## cleanup instagram imports +### mysql +```bash +DELETE from import_posts WHERE 1; +DELETE from import_jobs WHERE 1; +DELETE from import_datas WHERE 1; +DELETE from statuses where created_at < "2022-12-01 22:15:39"; +DELETE from media where deleted_at >= "2023-07-28 14:39:05"; +``` +### files +```bash +docker-compose exec -u "www-data" application rm -rv "/var/www/storage/app/imports/1" +docker-compose exec -u "www-data" application php artisan schedule:run ``` ## hard cleanup From 81212ea7ce48c84791c17b0bb05db48946739fc1 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 29 Jun 2023 14:50:38 +0200 Subject: [PATCH 09/14] Optimized pixelfed README.md file with ChatGPT --- roles/server_docker-pixelfed/README.md | 46 +++++++++++++++++++------- 1 file changed, 34 insertions(+), 12 deletions(-) diff --git a/roles/server_docker-pixelfed/README.md b/roles/server_docker-pixelfed/README.md index b90f4909..9150ded1 100644 --- a/roles/server_docker-pixelfed/README.md +++ b/roles/server_docker-pixelfed/README.md @@ -1,17 +1,27 @@ -# role server_docker-pixelfed +# Pixelfed Docker Server Role -## access application +This README details the steps to manage your Pixelfed instance running in a Docker container. This setup is part of the server_docker-pixelfed role within Kevin Veen-Birkenbach's computer-playbook located at [this GitHub repository](https://github.com/kevinveenbirkenbach/computer-playbook/tree/master/roles/server_docker-pixelfed). + +## Accessing Services + +### Application Access +To gain shell access to the application container, run the following command: ```bash docker-compose exec -it application bash ``` -## access database +### Database Access +To access the MariaDB instance in the database container, run the following command: ```bash docker-compose exec -it database mariadb -u pixelfed -p ``` -## cleanup instagram imports -### mysql +## Instagram Import Cleanup + +If you have imported posts from Instagram, you can clean up the imported data and files as follows: + +### Database Cleanup +Run these commands inside your MariaDB shell to remove import related data: ```bash DELETE from import_posts WHERE 1; DELETE from import_jobs WHERE 1; @@ -19,19 +29,25 @@ DELETE from import_datas WHERE 1; DELETE from statuses where created_at < "2022-12-01 22:15:39"; DELETE from media where deleted_at >= "2023-07-28 14:39:05"; ``` -### files + +### File System Cleanup +Run these commands to remove the imported files and trigger the cleanup job: ```bash docker-compose exec -u "www-data" application rm -rv "/var/www/storage/app/imports/1" docker-compose exec -u "www-data" application php artisan schedule:run ``` -## hard cleanup +## Full Cleanup (Reset) + +For a hard reset, which will delete all data and stop all services, use the following commands: ```bash docker-compose down docker volume rm pixelfed_application_data pixelfed_database pixelfed_redis_data ``` -## update +## Update Procedure + +To update your Pixelfed instance, navigate to the directory where your `docker-compose.yml` file is located and run these commands: ```bash cd {{path_docker_compose_files}}pixelfed/ && docker-compose down && @@ -41,13 +57,19 @@ docker-compose build && docker-compose -p pixelfed up -d --force-recreate ``` -## inspect +## Inspecting the Services +To see the status of all services or follow the logs, use these commands: ```bash docker-compose ps -a docker-compose logs -f ``` -## further information -- https://hub.docker.com/r/zknt/pixelfed -- https://blog.pixelfed.de/2020/05/29/pixelfed-in-docker/ \ No newline at end of file +## Further Reading +For additional information, refer to these resources: +- [Docker image on Docker Hub](https://hub.docker.com/r/zknt/pixelfed) +- [Blog Post about running Pixelfed in Docker](https://blog.pixelfed.de/2020/05/29/pixelfed-in-docker/) + +Author: Kevin Veen-Birkenbach, [https://www.veen.world](https://www.veen.world), [kevin@veen.world](mailto:kevin@veen.world) + +This README was optimized with the help of OpenAI's ChatGPT. You can view the conversation [here](https://chat.openai.com/share/3daea33f-2e30-46e9-a709-a9c93e823ed9). \ No newline at end of file From 813b286b2ce7884719ca2180f310e71e7f71c9c0 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Fri, 30 Jun 2023 17:42:24 +0200 Subject: [PATCH 10/14] Added missing software --- roles/pc_driver-epson-multiprinter/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/pc_driver-epson-multiprinter/tasks/main.yml b/roles/pc_driver-epson-multiprinter/tasks/main.yml index 6dbff4c6..b95db18f 100644 --- a/roles/pc_driver-epson-multiprinter/tasks/main.yml +++ b/roles/pc_driver-epson-multiprinter/tasks/main.yml @@ -4,7 +4,7 @@ name: - epson-printer-utility - imagescan-plugin-networkscan - #- epson-inkjet-printer-escpr + - epson-inkjet-printer-escpr - epson-inkjet-printer-escpr2 become: false - name: install imagescan From d91274d15e89eb98fb936f6d5b53e4d0194bf078 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Mon, 7 Aug 2023 21:17:31 +0200 Subject: [PATCH 11/14] Ignored errors of health check service --- roles/server_native-journalctl-health-check/handlers/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/server_native-journalctl-health-check/handlers/main.yml b/roles/server_native-journalctl-health-check/handlers/main.yml index 2b1afb60..b5852f76 100644 --- a/roles/server_native-journalctl-health-check/handlers/main.yml +++ b/roles/server_native-journalctl-health-check/handlers/main.yml @@ -4,6 +4,7 @@ state: reloaded enabled: yes daemon_reload: yes + ignore_errors: true - name: "restart journalctl-health-check.timer" systemd: name: journalctl-health-check.timer From 66f466b137a21cbb99e6147b24cf22089e460f68 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Mon, 7 Aug 2023 22:28:37 +0200 Subject: [PATCH 12/14] Installed python-psutil via pacman --- roles/independent_backups-cleanup-service/tasks/main.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/roles/independent_backups-cleanup-service/tasks/main.yml b/roles/independent_backups-cleanup-service/tasks/main.yml index 00770e50..e26934cd 100644 --- a/roles/independent_backups-cleanup-service/tasks/main.yml +++ b/roles/independent_backups-cleanup-service/tasks/main.yml @@ -1,11 +1,8 @@ -- name: install psutil - pip: - name: psutil - -- name: install lsof +- name: install lsof and python-psutil community.general.pacman: name: - lsof + - python-psutil state: present - name: "create {{docker_backups_cleanup}}" From d854dff7930f06be8a54861509d82eb741e3a8b6 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Mon, 7 Aug 2023 23:02:22 +0200 Subject: [PATCH 13/14] Installed python-panda via pacman --- roles/server_native-docker-volume-backup/tasks/main.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/roles/server_native-docker-volume-backup/tasks/main.yml b/roles/server_native-docker-volume-backup/tasks/main.yml index b02191fb..19909238 100644 --- a/roles/server_native-docker-volume-backup/tasks/main.yml +++ b/roles/server_native-docker-volume-backup/tasks/main.yml @@ -1,6 +1,9 @@ -- name: install pandas python package - pip: - name: pandas +- name: install pandas system wide + community.general.pacman: + name: + - lsof + - python-pandas + state: present - name: pull docker-volume-backup.git git: From bfcc93f37b7ca343f905cf05aac37a4a7c64c892 Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Wed, 16 Aug 2023 16:15:39 +0200 Subject: [PATCH 14/14] Added implementation hint for signal --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index e8bc132f..be2bdbfc 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,9 @@ Run: ansible-galaxy collection install -r requirements.yml ``` +## todo +- implement: https://archlinux.org/packages/extra/x86_64/signal-desktop/ + ## See - https://www.middlewareinventory.com/blog/run-ansible-playbook-locally/ - https://stackoverflow.com/questions/30533372/run-an-ansible-task-only-when-the-hostname-contains-a-string