本地:
下载代码
git clone https://github.com/Kanaries/Rath.git && cd Rath
在本地设置RATH客户端:
yarn install
yarn workspace rath-client build
启动RATH客户端:
yarn workspace rath-client start
如果默认端口(localhost:3000)不可用,RATH将自动提示一个新的端口建议。输入y并按下Enter键启动RATH。
docker
dockerfile
FROM ubuntu:20.04
USER root
RUN apt-get update && apt-get install supervisor nginx vim net-tools curl gnupg2 -y
RUN curl -s https://deb.nodesource.com/setup_16.x | bash
RUN apt-get update && apt-get install nodejs -y
RUN apt-get remove cmdtest
RUN apt-get remove yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN apt-get update && apt-get install yarn -y
ADD Rath /var/www/html/Rath
WORKDIR /var/www/html/Rath
RUN node -v
RUN yarn install
RUN yarn workspace rath-client build
#RUN yarn workspace rath-client start
ADD supervisord.conf /etc/supervisor/conf.d/
ENTRYPOINT supervisord -c /etc/supervisor/supervisord.conf
supervisord配置
[supervisord]
nodaemon=true
logfile=/dev/null
logfile_maxbytes=0
pidfile=/run/supervisord.pid
[program:rath]
command=yarn workspace rath-client start
stdout_logfile=/var/log/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/var/log/stderr
stderr_logfile_maxbytes=0
autorestart=false
startretries=0