📚 edit README for puyoskey (README.md, docs/logo.png)
This commit is contained in:
parent
ffcc1a0260
commit
223b325609
2 changed files with 222 additions and 0 deletions
222
README.md
222
README.md
|
@ -1,3 +1,223 @@
|
|||
<div align="center">
|
||||
|
||||
<img src="./docs/logo.png" height="150" />
|
||||
<h2>ぷよすきー</h2>
|
||||
|
||||
**🌎 [Puyoskey](https://git.v-sli.me/HidemaruOwO/puyoskey) is federated SNS based on Sharkey 🚀**
|
||||
|
||||
</div>
|
||||
|
||||
## Usage 💨
|
||||
|
||||
<details>
|
||||
<summary> Install depencies for AlmaLinux 9 Server ⛏️</summary>
|
||||
|
||||
install cli depencies
|
||||
|
||||
```bash
|
||||
dnf install -y epel-release
|
||||
dnf config-manager --set-enabled crb
|
||||
dnf install --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm -y
|
||||
dnf install --nogpgcheck https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm -y
|
||||
|
||||
dnf update -y
|
||||
dnf install -y git make automake gcc gcc-c++ kernel-devel kernel-headers ffmpeg vim jemalloc
|
||||
dnf groupinstall -y "Development Tools"
|
||||
```
|
||||
|
||||
install Node.js and pnpm:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://rpm.nodesource.com/setup_22.x | bash -
|
||||
dnf install nodejs -y
|
||||
|
||||
corepack enable
|
||||
# To type y
|
||||
pnpm
|
||||
```
|
||||
</details>
|
||||
|
||||
- Manual Install
|
||||
|
||||
create user for puyoskey:
|
||||
|
||||
```bash
|
||||
useradd -m -D puyoskey
|
||||
```
|
||||
|
||||
switch created user:
|
||||
|
||||
```bash
|
||||
sudo -iu puyoskey
|
||||
```
|
||||
|
||||
clone the puyoskey repository, and copy the example configuration file:
|
||||
|
||||
```bash
|
||||
git clone --recurse-submodules -b master https://git.v-sli.me/HidemaruOwO/puyoskey.git
|
||||
cd puyoskey
|
||||
pnpm install --frozen-lockfile
|
||||
cp .config/example.yml .config/default.yml
|
||||
```
|
||||
|
||||
build puyoskey:
|
||||
|
||||
```bash
|
||||
pnpm run build
|
||||
```
|
||||
|
||||
- setup DB (if postgresql installed):
|
||||
|
||||
attach psql:
|
||||
|
||||
```bash
|
||||
sudo -u postgres psql
|
||||
```
|
||||
|
||||
```sql
|
||||
CREATE DATABASE puyoskey WITH ENCODING = 'UTF8';
|
||||
CREATE USER puyoskey WITH ENCRYPTED PASSWORD '{YOUR_PASSWORD}';
|
||||
GRANT ALL PRIVILEGES ON DATABASE puyoskey TO puyoskey;
|
||||
ALTER DATABASE puyoskey OWNER TO puyoskey;
|
||||
\q
|
||||
```
|
||||
|
||||
edit configuration file:
|
||||
|
||||
```bash
|
||||
vim .config/default.yml
|
||||
```
|
||||
|
||||
create the schema:
|
||||
|
||||
```bash
|
||||
pnpm run init
|
||||
```
|
||||
|
||||
start puyoskey:
|
||||
|
||||
```bash
|
||||
pnpm start
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Run with systemd (you should change user as root)</summary>
|
||||
|
||||
Create a file `/etc/systemd/system/puyoskey.service` containing:
|
||||
|
||||
```bash
|
||||
[Unit]
|
||||
Description=Puyoskey daemon
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=puyoskey
|
||||
ExecStart=/bin/pnpm start
|
||||
WorkingDirectory=/home/puyoskey/puyoskey
|
||||
Environment="NODE_OPTIONS=--max-old-space-size=8192"
|
||||
Environment="NODE_ENV=production"
|
||||
Environment="LD_PRELOAD=/usr/lib64/libjemalloc.so.2"
|
||||
TimeoutSec=60
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=puyoskey
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
enable and run daemon service
|
||||
|
||||
```bash
|
||||
systemctl daemon-reload
|
||||
systemctl enable --now puyoskey.service
|
||||
```
|
||||
|
||||
- do you want periodic restart process?
|
||||
|
||||
Create a file `/etc/systemd/system/puyoskey.timer`:
|
||||
|
||||
```bash
|
||||
[Unit]
|
||||
Description = Puyoskey restart timer
|
||||
|
||||
[Timer]
|
||||
OnCalendar = daily
|
||||
Unit=puyoskey-restart.service
|
||||
|
||||
[Install]
|
||||
WantedBy = timers.target
|
||||
```
|
||||
|
||||
Create a file `/etc/systemd/system/puyoskey-restart.service`:
|
||||
|
||||
```bash
|
||||
[Unit]
|
||||
Description=Restart puyoskey service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/systemctl restart puyoskey.service
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
enable timer:
|
||||
|
||||
```bash
|
||||
systemctl enable puyoskey.timer
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
## Update 💫
|
||||
|
||||
```bash
|
||||
git checkout master
|
||||
git pull
|
||||
git submodule update --init
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm run build
|
||||
pnpm run migrate
|
||||
```
|
||||
|
||||
## Something Error 💣
|
||||
you should rebuild puyoskey
|
||||
```bash
|
||||
pnpm run clean-all
|
||||
pnpm rebuild
|
||||
```
|
||||
|
||||
## Update from Sharkey 🦈
|
||||
|
||||
When Sharkey is updated, puyoskey needs to follow suit!
|
||||
|
||||
```bash
|
||||
# If u have not yet added sharkey remote
|
||||
git remote add base https://activitypub.software/TransFem-org/Sharkey.git
|
||||
|
||||
git fetch base
|
||||
git checkout -b stable base/stable
|
||||
|
||||
# switch puyoskey branch
|
||||
git checkout master
|
||||
# merge from stable branch
|
||||
git merge --squash stable
|
||||
|
||||
# If u respond to conflicts or u don't got conflicts.
|
||||
# Commit message is example.
|
||||
git commit -m ":recycle: Merge updates from upstream as v2024.11.2"
|
||||
|
||||
git push origin master
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
<details>
|
||||
<summary>Sharkey Original README</summary>
|
||||
|
||||
<div align="center">
|
||||
<a href="https://joinsharkey.org/">
|
||||
<img src="https://activitypub.software/TransFem-org/Sharkey/-/raw/develop/packages/frontend/assets/sharkey.svg" alt="Sharkey logo" style="border-radius:50%" width="300"/>
|
||||
|
@ -51,3 +271,5 @@ With Sharkey, you can enable sign-ups, subject to manual moderator approval and
|
|||
## Documentation
|
||||
|
||||
Sharkey Documentation can be found at [Sharkey Documentation](https://docs.joinsharkey.org/docs/install/fresh/)
|
||||
|
||||
</details>
|
BIN
docs/logo.png
Normal file
BIN
docs/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 88 KiB |
Loading…
Add table
Reference in a new issue