computer-playbook/roles/docker-mastodon/README.md

52 lines
1.7 KiB
Markdown
Raw Normal View History

2022-11-15 11:56:48 +01:00
# docker mastodon
2022-11-15 11:56:48 +01:00
## create configuration
```bash
2023-04-19 00:03:13 +02:00
docker-compose run --rm web bundle exec rake mastodon:setup
2022-11-15 11:56:48 +01:00
```
## Setup with existing configuration
```bash
docker-compose run --rm web bundle exec rails db:migrate
```
2022-11-15 21:43:05 +01:00
## cleanup
```bash
2023-12-07 16:56:43 +01:00
cd {{path_docker_compose_instances}}mastodon/
2023-04-19 00:03:13 +02:00
docker-compose down
2022-11-15 21:43:05 +01:00
docker volume rm mastodon_data mastodon_database mastodon_redis
2023-12-07 16:56:43 +01:00
cd {{path_docker_compose_instances}} &&
rm -vR {{path_docker_compose_instances}}mastodon
2022-11-15 21:43:05 +01:00
```
## access terminal
```bash
docker-compose exec -it web /bin/bash
2022-11-15 21:43:05 +01:00
```
## set rights
2022-11-15 22:09:40 +01:00
After setting up mastodon you need to give the rights
2022-11-15 21:43:05 +01:00
```bash
docker-compose exec -it -u root web chown -R 991:991 public
2022-11-15 21:43:05 +01:00
```
2022-11-15 11:56:48 +01:00
2024-11-08 03:50:46 +01:00
### Running Database Migrations
To ensure all required database tables and structures are in place after an update, you can run database migrations directly within the Mastodon web container. Use the following command:
```bash
docker compose exec -it web bash -c "RAILS_ENV=production bin/rails db:migrate"
```
This command enters the web container and runs migrations in production mode, updating the database structure to match the current version of the Mastodon software. If your Mastodon web container is named differently in your `docker-compose.yml`, replace `web` with the appropriate container name.
2022-11-15 11:56:48 +01:00
## further information
2023-08-22 23:56:56 +02:00
- https://goneuland.de/mastodon-mit-docker-und-traefik-installieren/
2022-11-15 11:56:48 +01:00
- https://gist.github.com/TrillCyborg/84939cd4013ace9960031b803a0590c4
2022-11-15 21:43:05 +01:00
- https://www.2daygeek.com/linux-command-check-website-is-up-down-alive/
- https://vitobotta.com/2022/11/07/setting-up-a-personal-mastodon-instance/
2024-11-08 03:50:46 +01:00
- https://www.digitalocean.com/community/tutorials/how-to-scale-your-mastodon-server