docker test

This commit is contained in:
NullCat 2023-01-30 07:25:42 +09:00
parent 7a8b11c9f1
commit 6a787aad84
2 changed files with 11 additions and 21 deletions

View File

@ -1,25 +1,15 @@
FROM node:lts-bullseye
FROM node:lts
RUN apt-get update && apt-get install -y tini
RUN apt-get update
RUN apt-get install -y build-essential mecab libmecab-dev mecab-ipadic-utf8 sudo git make curl xz-utils file fonts-noto
ARG enable_mecab=1
RUN if [ $enable_mecab -ne 0 ]; then apt-get update \
&& apt-get install mecab libmecab-dev mecab-ipadic-utf8 make curl xz-utils file sudo --no-install-recommends -y \
&& apt-get clean \
&& rm -rf /var/lib/apt-get/lists/* \
&& cd /opt \
&& git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git \
&& cd /opt/mecab-ipadic-neologd \
&& ./bin/install-mecab-ipadic-neologd -n -y \
&& rm -rf /opt/mecab-ipadic-neologd \
&& echo "dicdir = /usr/lib/x86_64-linux-gnu/mecab/dic/mecab-ipadic-neologd/" > /etc/mecabrc \
&& apt-get purge git make curl xz-utils file -y; fi
COPY . /nullcatchan
WORKDIR /mecab-ipadic-neologd
RUN git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git
RUN cd mecab-ipadic-neologd && ./bin/install-mecab-ipadic-neologd -n -y -a
WORKDIR /nullcatchan
RUN npm install && npm run build
COPY . ./
RUN npm install
RUN npm build
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD npm start
CMD ["npm", "start"]

View File

@ -35,7 +35,7 @@ Misskey用の[Aiベース](https://github.com/syuilo/ai)のBotです。
"notingEnabled": "ランダムにートを投稿する機能。true(on) or false(off)",
"keywordEnabled": "キーワードを覚える機能 (MeCab が必要) true or false",
"serverMonitoring": "サーバー監視の機能重かったりすると教えてくれるよ。true or false",
"mecab": "MeCab のインストールパス (ソースからインストールした場合、大体は /usr/local/bin/mecab) true or false",
"mecab": "MeCab のインストールパス (ソースからインストールした場合、大体は /usr/local/bin/mecab) ",
"mecabDic": "MeCab の辞書ファイルパス",
"memoryDir": "memory.jsonの保存先オプション、デフォルトは'.'(レポジトリのルートです))",
"shellgeiUrl": "シェル芸BotのAPIのURLですデフォルトではhttps://websh.jiro4989.com/api/shellgei"