Skip to content

Fediverse Pasture

Warning

The process behind the docker containers is currently being reworked. Please see Quick Start for the current version.

The Fediverse Pasture is meant as a docker environment to make testing Fediverse applications easier. The Fediverse pasture uses docker compose to manage the setup and running of various services.

There are two main components:

  • The actual pasture defined in pasture.yml that contains tooling that enables the testing and debugging of Fediverse applications.
  • Compose files and configurations for other Fediverse applications, e.g. mastodon41.yml defines a configuration for Mastodon 4.1.x.

If an application is missing, feel free to contribute it.

Installation

The basic installation is done by cloning the git repository and then by first running an init step, and then starting the service. For example for the main pasture, one would first run

git clone https://codeberg.org/helge/funfedidev.git
cd funfedidev/fediverse-pasture

Then one can start the pasture via

docker compose --file pasture.yml up

The steps for the individual applications is similar with replacing pasture by the application name. For most of the Fediverse applications an additional step of initialization is necessary. for the pasture, it would have the form

docker compose --file pasture.yml --profile init up pasture_init

Connecting your application

When you are building an application, you will want to connect it to the Fediverse Pasture in order to test it. This can be achieved by providing a deployment of your application using docker, and then modifying your docker compose file to add

docker-compose.yml
services:
  your_application:
    networks:
      - default
networks:
  default:
    external: true
    name: fediverse-pasture_default

This will enable you to make requests to and from your application to the Fediverse pasture.

Alternatively, you can connect a docker container via the command line via

docker run -ti --network fediverse-pasture_default alpine

Used file structure

The structure of the fediverse pasture folder is as follows

├── README.md
├── pasture.yml
├── ... further docker compose files
├── dockerfiles
│   ├── pasture
│   │   ├── Dockerfile
│   │   ├── ... Further files
│   └── ... Further applications
├── volumes
│   ├── pasture
│   │   └── ... data used by docker containers
│   └── ... further data directories
└── work
    ├── ... application data for usage with pasture_runner

This means that dockerfiles contains information on how to build the containers in each docker compose file. Building containers is necessary as applications need to be patched to be usable through HTTP.

volumes contains the run time data for the containers. For example the database containers store their data there. So deleting volumes/<application_name> is a way to reset the corresponding application. Furthermore, it might be necessary to clear the browser data for the corresponding domain, e.g. http://firefish_web.

work contains the scripts to build the Support Tables.