Commit e035c61b authored by mercury233's avatar mercury233

update readme

parent c8de458e
Dockerfile
.git
.gitattributes
.gitignore
.gitmodules
.gitkeep
.dockerignore
...@@ -7,6 +7,7 @@ config.*.json ...@@ -7,6 +7,7 @@ config.*.json
ygopro ygopro
windbot windbot
/decks/
/node_modules/ /node_modules/
!/node_modules/struct/ !/node_modules/struct/
......
FROM node
RUN apt-get update
RUN apt-get install -y git build-essential premake4 libfreetype6-dev libevent-dev libsqlite3-dev liblua5.2-dev mono-complete cmake
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY package.json /usr/src/app/
RUN npm install
COPY . /usr/src/app
WORKDIR /usr/src/app/ygopro
ADD https://mycard.moe/ygopro/cards.cdb cards.cdb
RUN premake4 --os=linux --platform=x64 gmake
RUN ln -s /usr/lib/x86_64-linux-gnu/liblua5.2.so /usr/lib/liblua.so
WORKDIR /usr/src/app/ygopro/build
RUN make config=release ygopro
WORKDIR /usr/src/app/ygopro
RUN ln -s bin/release/ygopro ygopro
RUN strip ygopro
WORKDIR /usr/src/app/ygosharp
RUN xbuild /property:Configuration=Release /property:OutDir=/usr/src/app/windbot/
RUN mv /usr/src/app/windbot /usr/src/app/windbot-source
WORKDIR /usr/src/app/windbot-source/NLua/Core/KeraLua
ENV CFLAGS=-m64 CXXFLAGS=-m64 LDFLAGS=-m64
RUN make -f Makefile.Linux
RUN xbuild KeraLua.Net45.sln /p:Configuration=Release
WORKDIR /usr/src/app/windbot-source/NLua
RUN xbuild NLua.Net45.sln /p:Configuration=Release
RUN mv /usr/src/app/windbot-source/NLua/Run/Release/net45/*.dll /usr/src/app/windbot-source/
WORKDIR /usr/src/app/windbot-source
RUN xbuild /property:Configuration=Release /property:OutDir=/usr/src/app/windbot/
RUN mv /usr/src/app/windbot-source/NLua/Core/KeraLua/external/lua/linux/lib64/liblua52.so /usr/src/app/windbot/
WORKDIR /usr/src/app
#RUN rm -rf /usr/src/app/windbot-source
RUN ln -s /usr/src/app/ygopro/cards.cdb /usr/src/app/windbot/cards.cdb
WORKDIR /usr/src/app
CMD [ "npm", "start" ]
...@@ -11,10 +11,10 @@ ...@@ -11,10 +11,10 @@
* 广播消息 * 广播消息
* 召唤台词 * 召唤台词
* 先行卡一键更新 * 先行卡一键更新
* Windbot在线AI
###不支持功能 ###不支持功能
* 用户账号系统 * 用户账号系统
* 在线AI
* 在线聊天室 * 在线聊天室
###使用方法 ###使用方法
...@@ -22,34 +22,10 @@ ...@@ -22,34 +22,10 @@
* `git clone https://github.com/mercury233/ygopro-server.git` * `git clone https://github.com/mercury233/ygopro-server.git`
* `cd ygopro-server` * `cd ygopro-server`
* `npm install` * `npm install`
* 修改`config.json` * `config.json`复制为`config.user.json`并进行修改
* `port`为你想要的端口 * `port`为你想要的端口
* `version`为ygopro的十进制版本号(例如,0x1336=4918)
* `ygopro_path`为ygopro服务端的相对路径 * `ygopro_path`为ygopro服务端的相对路径
* `modules.stop`为文本时,表示服务器关闭 * `modules.stop`为文本时,表示服务器关闭
* `modules.TCG_banlist_id`为lflist中正在使用的TCG禁卡表的编号,0开始
* `node ygopro-server.js`即可运行 * `node ygopro-server.js`即可运行
* 简易的控制台在http://mercury233.me/ygosrv233/dashboard.html (我没有开发给用户使用的大厅的打算。) * 简易的控制台在http://mercury233.me/ygosrv233/dashboard.html (我没有开发给用户使用的大厅的打算。)
* 简易的先行卡更新控制台在http://mercury233.me/ygosrv233/pre-dashboard.html * 简易的先行卡更新控制台在http://mercury233.me/ygosrv233/pre-dashboard.html
###开发计划
* 重写全部代码,与SalvationServer合并,或作为分支版本
## Install Docker
```bash
wget -qO- https://get.docker.com/ | sh
```
see https://docs.docker.com/linux/step_one/ for more information.
## Deploy from DockerHub
```bash
docker run --name ygopro -p 7911:7911 -p 7922:7922 --restart=on-failure -d mycard/ygopro-server
```
## Build
```bash
git clone --recursive https://github.com/mycard/ygopro-server.git
cd ygopro-server
docker build -t ygopro-server .
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment