Optimized .mds and meta/main.yml for client-wireguard roles and refactored README.md of Docker Roles

This commit is contained in:
2025-03-14 14:42:59 +01:00
parent 17e2c992b3
commit 892403cf8c
142 changed files with 1427 additions and 1395 deletions

View File

@@ -0,0 +1,39 @@
# Administration
## 🗑️ Cleanup (Remove Instance & Volumes)
```bash
cd {{path_docker_compose_instances}}mastodon/
docker-compose down
docker volume rm mastodon_data mastodon_database mastodon_redis
cd {{path_docker_compose_instances}} &&
rm -vR {{path_docker_compose_instances}}mastodon
```
## 🔍 Access Mastodon Terminal
```bash
docker-compose exec -it web /bin/bash
```
## 🛠️ Set File Permissions
After setting up Mastodon, apply the correct file permissions:
```bash
docker-compose exec -it -u root web chown -R 991:991 public
```
# 📦 Database Management
## 🏗️ Running Database Migrations
Ensure all required database structures are up to date:
```bash
docker compose exec -it web bash -c "RAILS_ENV=production bin/rails db:migrate"
```
# 🚀 Performance Optimization
## 🗑️ Delete Cache & Recompile Assets
```bash
docker-compose exec web bundle exec rails assets:precompile
docker-compose restart
```
This ensures your Mastodon instance is loading the latest assets after updates.

View File

@@ -0,0 +1,22 @@
# ⚙️ Configuration & Setup
## 🔧 Create Credentials
Run the following command to generate a new configuration setup:
```bash
docker pull ghcr.io/mastodon/mastodon:latest
# Secret Generation
docker run --rm ghcr.io/mastodon/mastodon:latest bundle exec rails secret
docker run --rm ghcr.io/mastodon/mastodon:latest bundle exec rails secret
# Vapid Key Generation
docker run --rm ghcr.io/mastodon/mastodon:latest bundle exec rails mastodon:webpush:generate_vapid_key
# ACTIVE_RECORD_ENCRYPTION Generation
docker run --rm ghcr.io/mastodon/mastodon:latest bin/rails db:encryption:init
```
## 🔄 Setup with an Existing Configuration
```bash
docker-compose run --rm web bundle exec rails db:migrate
```
## 🔐 OIDC (OpenID Connect) Authentication Support
This Mastodon role now **fully supports OpenID Connect (OIDC)**, allowing seamless authentication via identity providers like **Keycloak, Auth0, Google, or other OIDC-compliant services**.

View File

@@ -3,70 +3,11 @@
## 📌 Overview
This project provides a **Docker-based setup for Mastodon**, including full **OIDC (OpenID Connect) authentication support**. It is maintained by **[Kevin Veen-Birkenbach](https://www.veen.world)**.
## Credits 📝
This README and some parts of the code were created with the assistance of ChatGPT. You can follow the discussion and evolution of this project in [this conversation](https://chatgpt.com/c/67a4e19b-3884-800f-9d45-621dda2a6572).
## ⚙️ Configuration & Setup
### 🔧 Create Credentials
Run the following command to generate a new configuration setup:
```bash
docker pull ghcr.io/mastodon/mastodon:latest
# Secret Generation
docker run --rm ghcr.io/mastodon/mastodon:latest bundle exec rails secret
docker run --rm ghcr.io/mastodon/mastodon:latest bundle exec rails secret
# Vapid Key Generation
docker run --rm ghcr.io/mastodon/mastodon:latest bundle exec rails mastodon:webpush:generate_vapid_key
# ACTIVE_RECORD_ENCRYPTION Generation
docker run --rm ghcr.io/mastodon/mastodon:latest bin/rails db:encryption:init
```
### 🔄 Setup with an Existing Configuration
```bash
docker-compose run --rm web bundle exec rails db:migrate
```
### 🗑️ Cleanup (Remove Instance & Volumes)
```bash
cd {{path_docker_compose_instances}}mastodon/
docker-compose down
docker volume rm mastodon_data mastodon_database mastodon_redis
cd {{path_docker_compose_instances}} &&
rm -vR {{path_docker_compose_instances}}mastodon
```
### 🔍 Access Mastodon Terminal
```bash
docker-compose exec -it web /bin/bash
```
### 🛠️ Set File Permissions
After setting up Mastodon, apply the correct file permissions:
```bash
docker-compose exec -it -u root web chown -R 991:991 public
```
## 📦 Database Management
### 🏗️ Running Database Migrations
Ensure all required database structures are up to date:
```bash
docker compose exec -it web bash -c "RAILS_ENV=production bin/rails db:migrate"
```
## 🚀 Performance Optimization
### 🗑️ Delete Cache & Recompile Assets
```bash
docker-compose exec web bundle exec rails assets:precompile
docker-compose restart
```
This ensures your Mastodon instance is loading the latest assets after updates.
## 🔐 OIDC (OpenID Connect) Authentication Support
This Mastodon role now **fully supports OpenID Connect (OIDC)**, allowing seamless authentication via identity providers like **Keycloak, Auth0, Google, or other OIDC-compliant services**.
## 📚 Further Reading
## 📚 Other Resources
- [Mastodon with Docker & Traefik](https://goneuland.de/mastodon-mit-docker-und-traefik-installieren/)
- [Mastodon Configuration Guide](https://gist.github.com/TrillCyborg/84939cd4013ace9960031b803a0590c4)
- [Check Website Availability](https://www.2daygeek.com/linux-command-check-website-is-up-down-alive/)