Skip to main content

Misskey

Misskey是一款去中心化的微博应用系统,适合用作QQ空间或者vx朋友圈或者是微博推特的代替品。

https://github.com/syuilo/misskey


services:

  misskey:
    image: misskey/misskey
    restart: always
    volumes:
      - ./bootstrap:/misskey/.config/
      - ./mnt/files:/misskey/files
    ports:
      - 15086:3000
    depends_on:
      - postgres
      - redis
    links:
      - postgres
      - redis

  postgres:
    image: postgres
    environment:
      POSTGRES_PASSWORD: <your_password_here>
      POSTGRES_USER: misskey
      POSTGRES_DB: misskey
    restart: always
    volumes:
      - ./mnt/postgresql/data:/var/lib/postgresql/data

  redis:
    image: redis
    restart: always
    command: redis-server --requirepass <your_password_here>
    environment:
      - REDIS_PASSWORD=<your_password_here>
    volumes:
      - ./mnt/redis/data:/data

其次是配置文件,在同一目录创建 bootstrap 文件夹,并添加 default.yml 文件

#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Misskey configuration
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

#   ┌─────┐
#───┘ URL └─────────────────────────────────────────────────────

# Final accessible URL seen by a user.
url: <your_final_address>

# ONCE YOU HAVE STARTED THE INSTANCE, DO NOT CHANGE THE
# URL SETTINGS AFTER THAT!

#   ┌───────────────────────┐
#───┘ Port and TLS settings └───────────────────────────────────

#
# Misskey supports two deployment options for public.
#

# Option 1: With Reverse Proxy
#
#                 +----- https://example.tld/ ------------+
#   +------+      |+-------------+      +----------------+|
#   | User | ---> || Proxy (443) | ---> | Misskey (3000) ||
#   +------+      |+-------------+      +----------------+|
#                 +---------------------------------------+
#
#   You need to setup reverse proxy. (eg. nginx)
#   You do not define 'https' section.

# Option 2: Standalone
#
#                 +- https://example.tld/ -+
#   +------+      |   +---------------+    |
#   | User | ---> |   | Misskey (443) |    |
#   +------+      |   +---------------+    |
#                 +------------------------+
#
#   You need to run Misskey as root.
#   You need to set Certificate in 'https' section.

# To use option 1, uncomment below line.
port: 3000    # A port that your Misskey server should listen.

# To use option 2, uncomment below lines.
#port: 443

#https:
#  # path for certification
#  key: /etc/letsencrypt/live/example.tld/privkey.pem
#  cert: /etc/letsencrypt/live/example.tld/fullchain.pem

#   ┌──────────────────────────┐
#───┘ PostgreSQL configuration └────────────────────────────────

db:
  host: postgres
  port: 5432

  # Database name
  db: misskey

  # Auth
  user: misskey
  pass: <your_password_here>

  # Whether disable Caching queries
  #disableCache: true

  # Extra Connection options
  #extra:
  #  ssl: true

#   ┌─────────────────────┐
#───┘ Redis configuration └─────────────────────────────────────

redis:
  host: redis
  port: 6379
  pass: <your_password_here>
  #prefix: example-prefix
  #db: 1

# Other

id: 'aid'