summaryrefslogtreecommitdiffstats
path: root/docs/src
diff options
context:
space:
mode:
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/SUMMARY.md1
-rw-r--r--docs/src/about.md2
-rw-r--r--docs/src/about_goals.md1
-rw-r--r--docs/src/administration_backup_and_restore.md44
-rw-r--r--docs/src/administration_install_ansible.md4
-rw-r--r--docs/src/contributing.md5
-rw-r--r--docs/src/contributing_docker_development.md2
-rw-r--r--docs/src/contributing_local_development.md2
-rw-r--r--docs/src/contributing_websocket_http_api.md99
9 files changed, 131 insertions, 29 deletions
diff --git a/docs/src/SUMMARY.md b/docs/src/SUMMARY.md
index 70c423c7..bff5cbf6 100644
--- a/docs/src/SUMMARY.md
+++ b/docs/src/SUMMARY.md
@@ -10,6 +10,7 @@
- [Install with Ansible](administration_install_ansible.md)
- [Install with Kubernetes](administration_install_kubernetes.md)
- [Configuration](administration_configuration.md)
+ - [Backup and Restore](administration_backup_and_restore.md)
- [Contributing](contributing.md)
- [Docker Development](contributing_docker_development.md)
- [Local Development](contributing_local_development.md)
diff --git a/docs/src/about.md b/docs/src/about.md
index 33ecb211..31081f48 100644
--- a/docs/src/about.md
+++ b/docs/src/about.md
@@ -4,7 +4,7 @@ Front Page|Post
---|---
![main screen](https://i.imgur.com/kZSRcRu.png)|![chat screen](https://i.imgur.com/4XghNh6.png)
-[Lemmy](https://github.com/dessalines/lemmy) is similar to sites like [Reddit](https://reddit.com), [Lobste.rs](https://lobste.rs), [Raddle](https://raddle.me), or [Hacker News](https://news.ycombinator.com/): you subscribe to forums you're interested in, post links and discussions, then vote, and comment on them. Behind the scenes, it is very different; anyone can easily run a server, and all these servers are federated (think email), and connected to the same universe, called the [Fediverse](https://en.wikipedia.org/wiki/Fediverse).
+[Lemmy](https://github.com/LemmyNet/lemmy) is similar to sites like [Reddit](https://reddit.com), [Lobste.rs](https://lobste.rs), [Raddle](https://raddle.me), or [Hacker News](https://news.ycombinator.com/): you subscribe to forums you're interested in, post links and discussions, then vote, and comment on them. Behind the scenes, it is very different; anyone can easily run a server, and all these servers are federated (think email), and connected to the same universe, called the [Fediverse](https://en.wikipedia.org/wiki/Fediverse).
For a link aggregator, this means a user registered on one server can subscribe to forums on any other server, and can have discussions with users registered elsewhere.
diff --git a/docs/src/about_goals.md b/docs/src/about_goals.md
index caa6948a..e0427481 100644
--- a/docs/src/about_goals.md
+++ b/docs/src/about_goals.md
@@ -51,3 +51,4 @@
- [Activitypub implementers guide](https://socialhub.activitypub.rocks/t/draft-guide-for-new-activitypub-implementers/479)
- [Data storage questions](https://socialhub.activitypub.rocks/t/data-storage-questions/579/3)
- [Activitypub as it has been understood](https://flak.tedunangst.com/post/ActivityPub-as-it-has-been-understood)
+- [Asonix http signatures in rust](https://git.asonix.dog/Aardwolf/http-signature-normalization)
diff --git a/docs/src/administration_backup_and_restore.md b/docs/src/administration_backup_and_restore.md
new file mode 100644
index 00000000..fe97cf88
--- /dev/null
+++ b/docs/src/administration_backup_and_restore.md
@@ -0,0 +1,44 @@
+# Backup and Restore Guide
+
+## Docker and Ansible
+
+When using docker or ansible, there should be a `volumes` folder, which contains both the database, and all the pictures. Copy this folder to the new instance to restore your data.
+
+### Incremental Database backup
+
+To incrementally backup the DB to an `.sql` file, you can run:
+
+```bash
+docker exec -t FOLDERNAME_postgres_1 pg_dumpall -c -U lemmy > lemmy_dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql
+```
+### A Sample backup script
+
+```bash
+#!/bin/sh
+# DB Backup
+ssh MY_USER@MY_IP "docker exec -t FOLDERNAME_postgres_1 pg_dumpall -c -U lemmy" > ~/BACKUP_LOCATION/INSTANCE_NAME_dump_`date +%Y-%m-%d"_"%H_%M_%S`.sql
+
+# Volumes folder Backup
+rsync -avP -zz --rsync-path="sudo rsync" MY_USER@MY_IP:/LEMMY_LOCATION/volumes ~/BACKUP_LOCATION/FOLDERNAME
+```
+
+### Restoring the DB
+
+If you need to restore from a `pg_dumpall` file, you need to first clear out your existing database
+
+```bash
+# Drop the existing DB
+docker exec -i FOLDERNAME_postgres_1 psql -U lemmy -c "DROP SCHEMA public CASCADE; CREATE SCHEMA public;"
+
+# Restore from the .sql backup
+cat db_dump.sql | docker exec -i FOLDERNAME_postgres_1 psql -U lemmy # restores the db
+
+# This also might be necessary when doing a db import with a different password.
+docker exec -i FOLDERNAME_postgres_1 psql -U lemmy -c "alter user lemmy with password 'bleh'"
+```
+
+## More resources
+
+- https://stackoverflow.com/questions/24718706/backup-restore-a-dockerized-postgresql-database
+
+
diff --git a/docs/src/administration_install_ansible.md b/docs/src/administration_install_ansible.md
index bf5e6749..77d901b3 100644
--- a/docs/src/administration_install_ansible.md
+++ b/docs/src/administration_install_ansible.md
@@ -7,7 +7,7 @@ First, you need to [install Ansible on your local computer](https://docs.ansible
Then run the following commands on your local computer:
```bash
-git clone https://github.com/dessalines/lemmy.git
+git clone https://github.com/LemmyNet/lemmy.git
cd lemmy/ansible/
cp inventory.example inventory
nano inventory # enter your server, domain, contact email
@@ -19,4 +19,4 @@ To update to a new version, just run the following in your local Lemmy repo:
git pull origin master
cd ansible
ansible-playbook lemmy.yml --become
-``` \ No newline at end of file
+```
diff --git a/docs/src/contributing.md b/docs/src/contributing.md
index 9a01ad5d..4eabd6fc 100644
--- a/docs/src/contributing.md
+++ b/docs/src/contributing.md
@@ -4,13 +4,14 @@ Information about contributing to Lemmy, whether it is translating, testing, des
## Issue tracking / Repositories
-- [GitHub (for issues)](https://github.com/dessalines/lemmy)
+- [GitHub (for issues)](https://github.com/LemmyNet/lemmy)
- [Gitea](https://yerbamate.dev/dessalines/lemmy)
- [GitLab](https://gitlab.com/dessalines/lemmy)
## Translating
-Go [here](https://github.com/dessalines/lemmy#translations) for translation instructions.
+Check out [Lemmy's Weblate](https://weblate.yerbamate.dev/projects/lemmy/) for translations.
+
## Architecture
diff --git a/docs/src/contributing_docker_development.md b/docs/src/contributing_docker_development.md
index d5ab5829..09239821 100644
--- a/docs/src/contributing_docker_development.md
+++ b/docs/src/contributing_docker_development.md
@@ -3,7 +3,7 @@
## Running
```bash
-git clone https://github.com/dessalines/lemmy
+git clone https://github.com/LemmyNet/lemmy
cd lemmy/docker/dev
./docker_update.sh # This builds and runs it, updating for your changes
```
diff --git a/docs/src/contributing_local_development.md b/docs/src/contributing_local_development.md
index 175b000c..e823c9d1 100644
--- a/docs/src/contributing_local_development.md
+++ b/docs/src/contributing_local_development.md
@@ -22,7 +22,7 @@ export LEMMY_DATABASE_URL=postgres://lemmy:password@localhost:5432/lemmy
#### Running
```bash
-git clone https://github.com/dessalines/lemmy
+git clone https://github.com/LemmyNet/lemmy
cd lemmy
./install.sh
# For live coding, where both the front and back end, automagically reload on any save, do:
diff --git a/docs/src/contributing_websocket_http_api.md b/docs/src/contributing_websocket_http_api.md
index a73a1c13..f228f94e 100644
--- a/docs/src/contributing_websocket_http_api.md
+++ b/docs/src/contributing_websocket_http_api.md
@@ -92,85 +92,93 @@
- [Request](#request-17)
- [Response](#response-17)
- [HTTP](#http-18)
- * [Community](#community)
- + [Get Community](#get-community)
+ + [Get Site Config](#get-site-config)
- [Request](#request-18)
- [Response](#response-18)
- [HTTP](#http-19)
- + [Create Community](#create-community)
+ + [Save Site Config](#save-site-config)
- [Request](#request-19)
- [Response](#response-19)
- [HTTP](#http-20)
- + [List Communities](#list-communities)
+ * [Community](#community)
+ + [Get Community](#get-community)
- [Request](#request-20)
- [Response](#response-20)
- [HTTP](#http-21)
- + [Ban from Community](#ban-from-community)
+ + [Create Community](#create-community)
- [Request](#request-21)
- [Response](#response-21)
- [HTTP](#http-22)
- + [Add Mod to Community](#add-mod-to-community)
+ + [List Communities](#list-communities)
- [Request](#request-22)
- [Response](#response-22)
- [HTTP](#http-23)
- + [Edit Community](#edit-community)
+ + [Ban from Community](#ban-from-community)
- [Request](#request-23)
- [Response](#response-23)
- [HTTP](#http-24)
- + [Follow Community](#follow-community)
+ + [Add Mod to Community](#add-mod-to-community)
- [Request](#request-24)
- [Response](#response-24)
- [HTTP](#http-25)
- + [Get Followed Communities](#get-followed-communities)
+ + [Edit Community](#edit-community)
- [Request](#request-25)
- [Response](#response-25)
- [HTTP](#http-26)
- + [Transfer Community](#transfer-community)
+ + [Follow Community](#follow-community)
- [Request](#request-26)
- [Response](#response-26)
- [HTTP](#http-27)
- * [Post](#post)
- + [Create Post](#create-post)
+ + [Get Followed Communities](#get-followed-communities)
- [Request](#request-27)
- [Response](#response-27)
- [HTTP](#http-28)
- + [Get Post](#get-post)
+ + [Transfer Community](#transfer-community)
- [Request](#request-28)
- [Response](#response-28)
- [HTTP](#http-29)
- + [Get Posts](#get-posts)
+ * [Post](#post)
+ + [Create Post](#create-post)
- [Request](#request-29)
- [Response](#response-29)
- [HTTP](#http-30)
- + [Create Post Like](#create-post-like)
+ + [Get Post](#get-post)
- [Request](#request-30)
- [Response](#response-30)
- [HTTP](#http-31)
- + [Edit Post](#edit-post)
+ + [Get Posts](#get-posts)
- [Request](#request-31)
- [Response](#response-31)
- [HTTP](#http-32)
- + [Save Post](#save-post)
+ + [Create Post Like](#create-post-like)
- [Request](#request-32)
- [Response](#response-32)
- [HTTP](#http-33)
- * [Comment](#comment)
- + [Create Comment](#create-comment)
+ + [Edit Post](#edit-post)
- [Request](#request-33)
- [Response](#response-33)
- [HTTP](#http-34)
- + [Edit Comment](#edit-comment)
+ + [Save Post](#save-post)
- [Request](#request-34)
- [Response](#response-34)
- [HTTP](#http-35)
- + [Save Comment](#save-comment)
+ * [Comment](#comment)
+ + [Create Comment](#create-comment)
- [Request](#request-35)
- [Response](#response-35)
- [HTTP](#http-36)
- + [Create Comment Like](#create-comment-like)
+ + [Edit Comment](#edit-comment)
- [Request](#request-36)
- [Response](#response-36)
- [HTTP](#http-37)
+ + [Save Comment](#save-comment)
+ - [Request](#request-37)
+ - [Response](#response-37)
+ - [HTTP](#http-38)
+ + [Create Comment Like](#create-comment-like)
+ - [Request](#request-38)
+ - [Response](#response-38)
+ - [HTTP](#http-39)
* [RSS / Atom feeds](#rss--atom-feeds)
+ [All](#all)
+ [Community](#community-1)
@@ -779,6 +787,53 @@ Search types are `All, Comments, Posts, Communities, Users, Url`
`POST /site/transfer`
+#### Get Site Config
+##### Request
+```rust
+{
+ op: "GetSiteConfig",
+ data: {
+ auth: String
+ }
+}
+```
+##### Response
+```rust
+{
+ op: "GetSiteConfig",
+ data: {
+ config_hjson: String,
+ }
+}
+```
+##### HTTP
+
+`GET /site/config`
+
+#### Save Site Config
+##### Request
+```rust
+{
+ op: "SaveSiteConfig",
+ data: {
+ config_hjson: String,
+ auth: String
+ }
+}
+```
+##### Response
+```rust
+{
+ op: "SaveSiteConfig",
+ data: {
+ config_hjson: String,
+ }
+}
+```
+##### HTTP
+
+`PUT /site/config`
+
### Community
#### Get Community
##### Request