Jelajahi Sumber

📝: add README

ulyc 2 tahun lalu
induk
melakukan
7949ed0546
1 mengubah file dengan 42 tambahan dan 57 penghapusan
  1. 42 57
      README.md

+ 42 - 57
README.md

@@ -1,77 +1,62 @@
-- SourceCode: https://sr.ht/~sircmpwn/sourcehut/sources
+# sourcehut  [x]  docker
+![img.png](img.png)  
 
-- About Builds: https://man.sr.ht/builds.sr.ht/installation.md
 
-- sourcehut pages https://srht.site/quickstart
+[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
+![Docker](https://img.shields.io/badge/%F0%9F%90%8B%20-docker-blue)
 
-参考:
-- https://git.sr.ht/~kolk/srht-docker/tree/master/item/docker-compose.yml
-- https://git.sr.ht/~robertgzr/sourcehut-containers/tree
 
+> This project is not recommend for use in production.
 
+## Quick Start
 
-- https://emersion.fr/blog/2021/setting-up-sr.ht-for-local-development/
+```bash
+bash ./init.sh
 
+docker-compose up --build -d
+```
+If you don't set domain, it will be set to `localtest.me`(Resolve to 127.0.0.1).
 
+You can visit the site at `http://meta.localtest.me`.
 
-### [meta.sr.ht](https://git.sr.ht/~sircmpwn/meta.sr.ht):
-##### Daemons
--   `meta.sr.ht` — The web service.
--   `meta.sr.ht-api` — The API service.
--   `meta.sr.ht-webhooks` — Webhook delivery service.
+## Init Admin Account
 
-##### [#](https://man.sr.ht/meta.sr.ht/installation.md#cronjobs)Cronjobs
-- metasrht-daily: Purges old audit log entries and runs billing.
+```bash
+$ docker exec -it {{your_container_id}} /bin/sh
 
+$ /usr/bin/metasrht-manageuser [-fmPps] [-e <EMAIL>] [-t <USER_TYPE>] <USERNAME>
 
-### [git.sr.ht]([https://git.sr.ht/~sircmpwn/git.sr.ht](https://git.sr.ht/~sircmpwn/git.sr.ht))
-##### Daemons
--   `git.sr.ht` — The web service.
--   `git.sr.ht-api` — The API service.
--   `git.sr.ht-webhooks` — Webhook delivery service.
 
-##### [#](https://man.sr.ht/git.sr.ht/installation.md#cronjobs)Cronjobs
--   `gitsrht-periodic` — Performs various maintenance tasks.
+Options:
+    -e <EMAIL>      set user email
+    -f              perform action even if using different authentication method
+    -m              modify existing user
+    -P              clear password
+    -p              set password (default if creating a new user)
+    -s              read initial password from stdin (only effective with -p)
+    -t <USER_TYPE>  set user type to USER_TYPE; USER_TYPE must be one of these
+                    values: unconfirmed, active_non_paying, active_free,
+                    active_paying, active_delinquent, admin, unknown, suspended
+````
+##  Configuration
 
-### hg.sr.ht
-##### Daemons
--   `hg.sr.ht` — The web service.
+If you list want to run `lists.sr.ht` or `api` service, you need to set SMTP in [mail] section of `./config.ini` .
+Then uncomment the code corresponding in `start.sh`.
 
-##### [#](https://man.sr.ht/hg.sr.ht/installation.md#cronjobs)Cronjobs
--   `hgsrht-periodic`: Performs various maintenance tasks.
--   `hgsrht-clonebundles` (optional): Generates [clone bundles](https://www.mercurial-scm.org/wiki/ClonebundlesExtension).
+```bash
+docker-compose up --build -d --force
+````
 
-## [ lists.sr.ht]([https://git.sr.ht/~sircmpwn/lists.sr.ht](https://git.sr.ht/~sircmpwn/lists.sr.ht))
-##### Daemons
--   `lists.sr.ht` — The web service.
--   `lists.sr.ht-lmtp` — Incoming mail service.
--   `lists.sr.ht-process` — Mail processing service. 
--   `lists.sr.ht-webhooks` — Webhook delivery service.
-##### Configuration
-See [Configuration](https://man.sr.ht/lists.sr.ht/configuration.md).
+### Advance Configuration
+See [official document](https://man.sr.ht/configuration.md)
 
-### man.sr.ht
-##### Daemons
--   `man.sr.ht` — The web service.
-##### Configuration
 
-See [Configuration](https://man.sr.ht/man.sr.ht/configuration.md).
+## Requirements
 
-#### paste.sr.ht
-##### Daemons
--   `paste.sr.ht` — The web service.
+```bash
+docker-compose version > 1.29
+```
 
-### [todo.sr.ht](https://git.sr.ht/~sircmpwn/todo.sr.ht](https://git.sr.ht/~sircmpwn/todo.sr.ht)
-##### Daemons
-
--   `todo.sr.ht` — The web service.
--   `todo.sr.ht-lmtp` — Incoming mail service.
--   `todo.sr.ht-webhooks` — Webhook delivery service.
-
-##### [#](https://man.sr.ht/todo.sr.ht/installation.md#configuration)Configuration
-
-See [Configuration](https://man.sr.ht/todo.sr.ht/configuration.md).
-
-
-###  dispatch.sr.ht
- [Planned deprecation of dispatch.sr.ht](https://sourcehut.org/blog/2022-08-01-dispatch-deprecation-plans/)
+## Links 
+-  [sourcehut official site](https://sourcehut.org/)
+-  sourcehut 中文介绍