From 08f4c69b4f901292a75cf88083734733961b8d3a Mon Sep 17 00:00:00 2001
From: M33 <327-m33@git.qoto.org>
Date: Thu, 6 Jan 2022 21:24:16 +0000
Subject: [PATCH] passwordz

---
 README.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/README.md b/README.md
index ea3f649..8bb7b3d 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,60 @@ This particular setting in your instance configuration yaml in the `.config/defa
 signToActivityPubGet: true
 ```
 
+## Set a password to postgresql and redis databases
+### Postgresql
+The default Misskey configuration files provies all you need to set a user and password for your postgresql container.
+Set the exact same values in Misskey's config file `default.yml` and the environment files loaded with the postgresql container `docker.env`
+
+The `.config/default.yml` file should contains:
+```
+#   ┌──────────────────────────┐
+#───┘ PostgreSQL configuration └────────────────────────────────
+
+db:
+#loclahost
+  host: db
+  port: 5432
+
+  # Database name
+  db: misskey
+
+  # Auth
+  user: your_username_goes_here
+  pass: your_super_password_goes_here
+(...)
+```
+
+The `.config/docker.env` file should contains:
+```
+# db settings
+POSTGRES_PASSWORD=your_username_goes_here
+POSTGRES_USER=your_super_password_goes_here-user
+(...)
+```
+
+### Redis 
+Pay attention to the `command:` and `volumes` lines of the redis chapter in the yaml template `miskey-arm64.yml`. 
+They are added here to help the redis container to load its configuration file (with a required password inside), it will match the reddis password in Misskey's configuration file `default.yml`.
+
+The `.config/default.yml` file should contains:
+```
+#   ┌─────────────────────┐
+#───┘ Redis configuration └─────────────────────────────────────
+
+redis:
+#localhost
+  host: redis
+  port: 6379
+  pass: your_redis_super_password_goes_here
+(...)
+```
+
+The `.config/redis.conf` file should contains:
+```
+requirepass your_redis_super_password_goes_here
+```
+
 ## Fill your global timeline with relays
 Bootstraping a new instance, solo or small sized, is a real pain. You will see only content from people you follow. A solution to fill your TL is to register your instance to relays, that will repeat content from others instances to your TL.
 Here is a list of popular relays:
-- 
GitLab