mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
Optimized .mds and meta/main.yml for client-wireguard roles and refactored README.md of Docker Roles
This commit is contained in:
92
roles/docker-friendica/Administration.md
Normal file
92
roles/docker-friendica/Administration.md
Normal file
@@ -0,0 +1,92 @@
|
||||
## Administration 📚
|
||||
|
||||
### Full Reset 🚫➡️✅
|
||||
|
||||
The following environment variables need to be defined for successful operation:
|
||||
|
||||
- `DB_ROOT_PASSWORD`: The root password for the MariaDB instance
|
||||
|
||||
To completely reset Friendica, including its database and volumes, run:
|
||||
```bash
|
||||
docker exec -i central-mariadb mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;"
|
||||
docker compose down
|
||||
rm -rv /mnt/hdd/data/docker/volumes/friendica_data
|
||||
docker volume rm friendica_data
|
||||
```
|
||||
|
||||
### Reset Database 🗄️
|
||||
|
||||
#### Manual Method:
|
||||
1. Connect to the MariaDB instance:
|
||||
```bash
|
||||
docker exec -it central-mariadb mariadb -u root -p
|
||||
```
|
||||
2. Run the following commands:
|
||||
```sql
|
||||
DROP DATABASE friendica;
|
||||
CREATE DATABASE friendica;
|
||||
exit;
|
||||
```
|
||||
|
||||
#### Automatic Method:
|
||||
```bash
|
||||
DB_ROOT_PASSWORD="your_root_password"
|
||||
docker exec -i central-mariadb mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;"
|
||||
```
|
||||
|
||||
### Enter the Application Container 🔍
|
||||
|
||||
To access the application container:
|
||||
```bash
|
||||
docker compose exec -it application sh
|
||||
```
|
||||
|
||||
### Debugging Tools 🛠️
|
||||
|
||||
#### Check Environment Variables
|
||||
```bash
|
||||
docker compose exec -it application printenv
|
||||
```
|
||||
|
||||
#### Inspect Volume Data
|
||||
```bash
|
||||
ls -la /var/lib/docker/volumes/friendica_data/_data/
|
||||
```
|
||||
|
||||
### Autoinstall 🌟
|
||||
|
||||
Run the following command to autoinstall Friendica:
|
||||
```bash
|
||||
docker compose exec --user www-data -it application bin/console autoinstall
|
||||
```
|
||||
|
||||
### Reinitialization 🔄
|
||||
|
||||
#### Docker Only:
|
||||
```bash
|
||||
docker-compose up -d --force-recreate
|
||||
```
|
||||
|
||||
#### Full Reinitialization:
|
||||
```bash
|
||||
docker-compose up -d --force-recreate && sleep 2; docker compose exec --user www-data -it application bin/console autoinstall;
|
||||
```
|
||||
|
||||
### Configuration Information ℹ️
|
||||
|
||||
#### General Configuration:
|
||||
```bash
|
||||
cat /var/lib/docker/volumes/friendica_data/_data/config/local.config.php
|
||||
```
|
||||
|
||||
#### Email Configuration:
|
||||
```bash
|
||||
docker compose exec -it application cat /etc/msmtprc
|
||||
```
|
||||
|
||||
### Email Debugging ✉️
|
||||
|
||||
To send a test email:
|
||||
```bash
|
||||
docker compose exec -it application msmtp --account=system_email -t test@test.de
|
||||
```
|
@@ -2,7 +2,7 @@
|
||||
|
||||
This role manages the setup, reset, and maintenance of a Friendica instance running with Docker.
|
||||
|
||||
## Overview 🚀
|
||||
## 📌 Overview
|
||||
|
||||
Friendica is a decentralized social networking platform. This role helps manage Friendica in a containerized environment with Docker and provides tools for debugging, resetting, and maintaining the installation.
|
||||
|
||||
@@ -13,100 +13,7 @@ Ensure you have the following:
|
||||
- A central MariaDB instance running
|
||||
- Necessary permissions to manage Docker and database configurations
|
||||
|
||||
## Usage 📚
|
||||
|
||||
### Full Reset 🚫➡️✅
|
||||
|
||||
The following environment variables need to be defined for successful operation:
|
||||
|
||||
- `DB_ROOT_PASSWORD`: The root password for the MariaDB instance
|
||||
|
||||
To completely reset Friendica, including its database and volumes, run:
|
||||
```bash
|
||||
docker exec -i central-mariadb mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;"
|
||||
docker compose down
|
||||
rm -rv /mnt/hdd/data/docker/volumes/friendica_data
|
||||
docker volume rm friendica_data
|
||||
```
|
||||
|
||||
### Reset Database 🗄️
|
||||
|
||||
#### Manual Method:
|
||||
1. Connect to the MariaDB instance:
|
||||
```bash
|
||||
docker exec -it central-mariadb mariadb -u root -p
|
||||
```
|
||||
2. Run the following commands:
|
||||
```sql
|
||||
DROP DATABASE friendica;
|
||||
CREATE DATABASE friendica;
|
||||
exit;
|
||||
```
|
||||
|
||||
#### Automatic Method:
|
||||
```bash
|
||||
DB_ROOT_PASSWORD="your_root_password"
|
||||
docker exec -i central-mariadb mariadb -u root -p"${DB_ROOT_PASSWORD}" -e "DROP DATABASE IF EXISTS friendica; CREATE DATABASE friendica;"
|
||||
```
|
||||
|
||||
### Enter the Application Container 🔍
|
||||
|
||||
To access the application container:
|
||||
```bash
|
||||
docker compose exec -it application sh
|
||||
```
|
||||
|
||||
### Debugging Tools 🛠️
|
||||
|
||||
#### Check Environment Variables
|
||||
```bash
|
||||
docker compose exec -it application printenv
|
||||
```
|
||||
|
||||
#### Inspect Volume Data
|
||||
```bash
|
||||
ls -la /var/lib/docker/volumes/friendica_data/_data/
|
||||
```
|
||||
|
||||
### Autoinstall 🌟
|
||||
|
||||
Run the following command to autoinstall Friendica:
|
||||
```bash
|
||||
docker compose exec --user www-data -it application bin/console autoinstall
|
||||
```
|
||||
|
||||
### Reinitialization 🔄
|
||||
|
||||
#### Docker Only:
|
||||
```bash
|
||||
docker-compose up -d --force-recreate
|
||||
```
|
||||
|
||||
#### Full Reinitialization:
|
||||
```bash
|
||||
docker-compose up -d --force-recreate && sleep 2; docker compose exec --user www-data -it application bin/console autoinstall;
|
||||
```
|
||||
|
||||
### Configuration Information ℹ️
|
||||
|
||||
#### General Configuration:
|
||||
```bash
|
||||
cat /var/lib/docker/volumes/friendica_data/_data/config/local.config.php
|
||||
```
|
||||
|
||||
#### Email Configuration:
|
||||
```bash
|
||||
docker compose exec -it application cat /etc/msmtprc
|
||||
```
|
||||
|
||||
### Email Debugging ✉️
|
||||
|
||||
To send a test email:
|
||||
```bash
|
||||
docker compose exec -it application msmtp --account=system_email -t test@test.de
|
||||
```
|
||||
|
||||
## Additional Resources 📖
|
||||
## 📚 Other Resources
|
||||
|
||||
- [Friendica Docker Hub](https://hub.docker.com/_/friendica)
|
||||
- [Friendica Installation Docs](https://wiki.friendi.ca/docs/install)
|
||||
|
Reference in New Issue
Block a user