Compare commits
2 commits
main
...
federation
Author | SHA1 | Date | |
---|---|---|---|
2a2b1713f8 | |||
ed4c73f8e6 |
1 changed files with 27 additions and 17 deletions
44
docs/src/contributing_federation_development.md
vendored
44
docs/src/contributing_federation_development.md
vendored
|
@ -5,14 +5,7 @@
|
||||||
If you don't have a local clone of the Lemmy repo yet, just run the following command:
|
If you don't have a local clone of the Lemmy repo yet, just run the following command:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/LemmyNet/lemmy -b federation
|
git clone https://github.com/LemmyNet/lemmy
|
||||||
```
|
|
||||||
|
|
||||||
If you already have the Lemmy repo cloned, you need to add a new remote:
|
|
||||||
```bash
|
|
||||||
git remote add federation https://github.com/LemmyNet/lemmy
|
|
||||||
git checkout federation
|
|
||||||
git pull federation federation
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running locally
|
## Running locally
|
||||||
|
@ -26,18 +19,34 @@ You need to have the following packages installed, the Docker service needs to b
|
||||||
|
|
||||||
Then run the following
|
Then run the following
|
||||||
```bash
|
```bash
|
||||||
cd dev/federation-test
|
cd docker/federation
|
||||||
./run-federation-test.bash
|
./run-federation-test.bash -yarn
|
||||||
```
|
```
|
||||||
|
|
||||||
After the build is finished and the docker-compose setup is running, open [127.0.0.1:8540](http://127.0.0.1:8540) and
|
The federation test sets up 3 instances:
|
||||||
[127.0.0.1:8550](http://127.0.0.1:8550) in your browser to use the test instances. You can login as admin with
|
|
||||||
username `lemmy_alpha` and `lemmy_beta` respectively, with password `lemmy`.
|
Instance / Username | Location
|
||||||
|
--- | ---
|
||||||
|
lemmy_alpha | [127.0.0.1:8540](http://127.0.0.1:8540)
|
||||||
|
lemmy_beta | [127.0.0.1:8550](http://127.0.0.1:8550)
|
||||||
|
lemmy_gamma | [127.0.0.1:8560](http://127.0.0.1:8560)
|
||||||
|
|
||||||
|
You can log into each using the instance name, and `lemmy` as the password, IE (`lemmy_alpha`, `lemmy`).
|
||||||
|
|
||||||
|
Firefox containers are a good way to test them interacting.
|
||||||
|
|
||||||
|
## Integration tests
|
||||||
|
|
||||||
|
To run a suite of suite of federation integration tests:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd docker/federation-test
|
||||||
|
./run-tests.sh
|
||||||
|
```
|
||||||
|
|
||||||
## Running on a server
|
## Running on a server
|
||||||
|
|
||||||
Note that federation is currently in alpha. Only use it for testing, not on any production server, and be aware
|
Note that federation is currently in alpha. **Only use it for testing**, not on any production server, and be aware that turning on federation may break your instance.
|
||||||
that you might have to wipe the instance data at one point or another.
|
|
||||||
|
|
||||||
Follow the normal installation instructions, either with [Ansible](administration_install_ansible.md) or
|
Follow the normal installation instructions, either with [Ansible](administration_install_ansible.md) or
|
||||||
[manually](administration_install_docker.md). Then replace the line `image: dessalines/lemmy:v0.x.x` in
|
[manually](administration_install_docker.md). Then replace the line `image: dessalines/lemmy:v0.x.x` in
|
||||||
|
@ -47,11 +56,12 @@ Follow the normal installation instructions, either with [Ansible](administratio
|
||||||
```
|
```
|
||||||
federation: {
|
federation: {
|
||||||
enabled: true
|
enabled: true
|
||||||
allowed_instances: example.com
|
tls_enabled: true,
|
||||||
|
allowed_instances: example.com,
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Afterwards, and whenver you want to update to the latest version, run these commands on the server:
|
Afterwards, and whenever you want to update to the latest version, run these commands on the server:
|
||||||
|
|
||||||
```
|
```
|
||||||
cd /lemmy/
|
cd /lemmy/
|
||||||
|
|
Loading…
Reference in a new issue