- 在已安裝好 docker 與 docker compose plugin 的 Ubuntu 22.04 LTS 主機上安裝 Misskey。
- 在家目錄新建 misskey 目錄。
- 建立 docker-compose.yml 檔案,這裡使用 Caddy 2 Server 在前端服務、反向代理。
- 建立 Caddyfile。
- 建立 config/ 目錄,並新增 default.yml 與 docker.env 兩個檔案,修改網域名稱、資料庫密碼等。
- 接著輸入
docker compose run --rm misskey yarn run init
讓 Misskey 容器建立資料庫。 - docker compose up -d 啟動。
- 稍等一下,前往 https://yourdomain.com 即可看到 Misskey,註冊第一名管理員用戶。
- 快樂悠遊聯邦宇宙!
Last active
November 21, 2022 08:06
-
-
Save wastemobile/3abe021dc899672631794cc86755ce3e to your computer and use it in GitHub Desktop.
Install Misskey
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3" | |
services: | |
caddy: | |
image: caddy:alpine | |
restart: always | |
container_name: caddy2 | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- /etc/timezone:/etc/timezone:ro | |
- /etc/localtime:/etc/localtime:ro | |
- ./Caddyfile:/etc/caddy/Caddyfile | |
- ./caddy_data:/data | |
- ./caddy_config:/config | |
networks: | |
- internal_network | |
- external_network | |
misskey: | |
image: misskey/misskey:latest | |
container_name: misskey | |
links: | |
- db | |
- redis | |
networks: | |
- internal_network | |
- external_network | |
volumes: | |
- ./config:/misskey/.config:ro | |
- ./files:/misskey/files | |
redis: | |
image: redis:latest | |
container_name: redis | |
restart: always | |
networks: | |
- internal_network | |
volumes: | |
- ./redis:/data | |
db: | |
image: postgres:12.2-alpine | |
container_name: db | |
restart: always | |
networks: | |
- internal_network | |
env_file: | |
- ./config/docker.env | |
volumes: | |
- ./db:/var/lib/postgresql/data | |
networks: | |
internal_network: | |
internal: true | |
external_network: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
email [email protected] | |
} | |
yourdomain.com { | |
reverse_proxy misskey:3001 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mkdir config && cd config | |
$ nano default.yml | |
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
# Misskey configuration | |
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
url: https://yourdomain.com | |
port: 3001 | |
db: | |
host: db | |
port: 5432 | |
db: misskey | |
user: postgresql-dbuser | |
pass: postgresql-pass | |
redis: | |
host: redis | |
port: 6379 | |
id: 'aid' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# db settings | |
POSTGRES_PASSWORD=example-misskey-pass | |
POSTGRES_USER=example-misskey-user | |
POSTGRES_DB=misskey |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment