Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standalone process #4170

Merged
merged 1 commit into from Nov 18, 2022
Merged

Standalone process #4170

merged 1 commit into from Nov 18, 2022

Conversation

mei23
Copy link
Owner

@mei23 mei23 commented Nov 18, 2022

Summary

Resolve #4156

効いてなかった以下のENVオプションを動くようにする
MK_ONLY_QUEUE queue処理のみ行う
MK_ONLY_SERVER server処理のみ行う

これにより例えば
MK_DISABLE_CLUSTERING=1 MK_ONLY_QUEUE=1 で起動するといわゆるqueue専用のプロセスが動かせるようになり
MK_DISABLE_CLUSTERING=1 MK_ONLY_SERVER=1 で起動するといわゆるserver専用のプロセスが動かせるようになる

@mei23
Copy link
Owner Author

mei23 commented Nov 18, 2022

検証用 docker-compose

version: "3"

services:
  server:
    image: mei23/meisskey:mei-20221116-standalone-process
    restart: always
    environment:
      - MK_DISABLE_CLUSTERING=1
      - MK_ONLY_SERVER=1
    links:
      - mongo
      - redis
    ports:
      - "0.0.0.0:3000:3000"
    networks:
      - internal_network
      - external_network
    volumes:
      - ./files:/misskey/files
      - ./.config:/misskey/.config

  queue:
    image: mei23/meisskey:mei-20221116-standalone-process
    restart: always
    environment:
      - MK_DISABLE_CLUSTERING=1
      - MK_ONLY_QUEUE=1
    links:
      - mongo
      - redis
    networks:
      - internal_network
      - external_network
    volumes:
      - ./files:/misskey/files
      - ./.config:/misskey/.config

  redis:
    restart: always
    image: redis:4.0-alpine
    networks:
      - internal_network
    volumes:
      - ./redis:/data

  mongo:
    restart: always
    image: mongo:4.4
    networks:
      - internal_network
    environment:
      MONGO_INITDB_DATABASE: "misskey"
    volumes:
      - ./.config/mongo_initdb.js:/docker-entrypoint-initdb.d/mongo_initdb.js:ro
      - ./mongo_db:/data/db

networks:
  internal_network:
    internal: true
  external_network:

@mei23 mei23 merged commit 880afc6 into mei-m544 Nov 18, 2022
@mei23
Copy link
Owner Author

mei23 commented Nov 19, 2022

1つの物理マシンで動かすならworkerStrategiesで調整したほうがいいかも

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

プロセス関連のENVオプションを動くようにする
1 participant