一款二次元的Web多人在线网络聊天系统:Fiora的部署


Install

Environmental Preparation

To run Fiora, you need Node.js(recommend v14 LTS version), MongoDB and redis

Recommended to running on Linux or MacOS systems

How to run

  1. Clone the project git clone https://github.com/yinxin630/fiora.git -b master
  2. Ensure you have install yarn before, if not please run npm install -g yarn
  3. Install project dependencies yarn install
  4. Build client yarn build:web
  5. Config JwtSecret echo "JwtSecret=<string>" > .env2. Change <string> to a secret text
  6. Start the server yarn start
  7. Open http://[ip]:[port](such as http://127.0.0.1:9200) in browser

Run in the background

Using yarn start to run the server will stop running after disconnecting the ssh connection, it is recommended to use pm2 to run

# install pm2
npm install -g pm2

# use pm2 to run fiora
pm2 start yarn --name fiora -- start

# view pm2 apps status
pm2 ls

# view pm2 fiora logging
pm2 logs fiora

Run With Develop Mode

  1. Start the server yarn dev:server
  2. Start the client yarn dev:web
  3. Open http://localhost:8080 in browser

Running on the docker

First install docker https://docs.docker.com/install/

Run directly from the DockerHub image

# Pull mongo
docker pull mongo

# Pull redis
docker pull redis

# Pull fiora
docker pull suisuijiang/fiora

# Create a virtual network
docker network create fiora-network

# Run mongodB
docker run --name fioradb -p 27017:27017 --network fiora-network mongo

# Run redis
docker run --name fioraredis -p 6379:6379 --network fiora-network redis

# Run fiora
docker run --name fiora -p 9200:9200 --network fiora-network -e Database=mongodb://fioradb:27017/fiora -e RedisHost=fioraredis suisuijiang/fiora

Local build image and run

  1. Clone the project to the local git clone https://github.com/yinxin630/fiora.git -b master
  2. Build the imagedocker-compose build --no-cache --force-rm
  3. Run it docker-compose up

文章作者: NekokeCore
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 NekokeCore !
 上一篇
一个开源、轻量且类似于Servo/Ngrok的内网穿透工具 一个开源、轻量且类似于Servo/Ngrok的内网穿透工具
说明:sish是一个SSH服务器,仅用于远程端口转发,可以快速将本地端口暴露在外网,作者声称其为Servo/Ngrok替代方案,仅使用SSH的HTTP(S)、WS(S)、TCP隧道连接到他们的localhost服务器,该工具和Servo差不
2020-02-15
下一篇 
hexo引用本地图片无法显示 hexo引用本地图片无法显示
最近重新开始用起hexo,但是发现在文章中引用本地图片时总是显示不出来。花费了许久时间才解决这个问题。因此将一些解决经验整理出来,希望能帮助到大家。 一、插件安装与配置首先我们需要安装一个图片路径转换的插件,这个插件名字是hexo-asse
2020-02-15
  目录