mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-10 06:51:04 +01:00
Optimized pixelfed README.md file with ChatGPT
This commit is contained in:
parent
4e87a98716
commit
730de49b1c
@ -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
|
```bash
|
||||||
docker-compose exec -it application 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
|
```bash
|
||||||
docker-compose exec -it database mariadb -u pixelfed -p
|
docker-compose exec -it database mariadb -u pixelfed -p
|
||||||
```
|
```
|
||||||
|
|
||||||
## cleanup instagram imports
|
## Instagram Import Cleanup
|
||||||
### mysql
|
|
||||||
|
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
|
```bash
|
||||||
DELETE from import_posts WHERE 1;
|
DELETE from import_posts WHERE 1;
|
||||||
DELETE from import_jobs 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 statuses where created_at < "2022-12-01 22:15:39";
|
||||||
DELETE from media where deleted_at >= "2023-07-28 14:39:05";
|
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
|
```bash
|
||||||
docker-compose exec -u "www-data" application rm -rv "/var/www/storage/app/imports/1"
|
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
|
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
|
```bash
|
||||||
docker-compose down
|
docker-compose down
|
||||||
docker volume rm pixelfed_application_data pixelfed_database pixelfed_redis_data
|
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
|
```bash
|
||||||
cd {{path_docker_compose_files}}pixelfed/ &&
|
cd {{path_docker_compose_files}}pixelfed/ &&
|
||||||
docker-compose down &&
|
docker-compose down &&
|
||||||
@ -41,13 +57,19 @@ docker-compose build &&
|
|||||||
docker-compose -p pixelfed up -d --force-recreate
|
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
|
```bash
|
||||||
docker-compose ps -a
|
docker-compose ps -a
|
||||||
docker-compose logs -f
|
docker-compose logs -f
|
||||||
```
|
```
|
||||||
|
|
||||||
## further information
|
## Further Reading
|
||||||
- https://hub.docker.com/r/zknt/pixelfed
|
For additional information, refer to these resources:
|
||||||
- https://blog.pixelfed.de/2020/05/29/pixelfed-in-docker/
|
- [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).
|
Loading…
Reference in New Issue
Block a user