-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
131 changed files
with
2,278 additions
and
1,750 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Build and Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
# linux_build: | ||
# permissions: write-all | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - name: Checkout code | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Set up Node.js ${{ matrix.node-version }} | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: ${{ matrix.node-version }} | ||
|
||
# - name: Set up Rust | ||
# uses: actions-rs/toolchain@v1 | ||
# with: | ||
# toolchain: stable | ||
|
||
# - name: Build | ||
# working-directory: ./ | ||
# run: rustc -V && bash ./build.sh && ls -al | ||
|
||
# - uses: ncipollo/release-action@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# artifacts: "lsys.tar.gz" | ||
# allowUpdates: true | ||
# token: ${{ secrets.GITHUB_TOKEN }} | ||
# name: ${{ github.event.head_commit.message }} | ||
# prerelease: true | ||
# tag: ${{ github.ref }} | ||
# body: tag version ${{ github.ref }} | ||
# skipIfReleaseExists: true | ||
|
||
windows_build: | ||
permissions: write-all | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Set up Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Build release | ||
run: ./build.cmd | ||
|
||
- name: Get current tag | ||
id: get_tag | ||
run: | | ||
$tag = $env:GITHUB_REF -replace 'refs/tags/', '' | ||
Write-Host "##[set-output name=tag;]$tag" | ||
- uses: ncipollo/release-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
artifacts: "lsys.zip" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
name: ${{ steps.get_tag.outputs.tag }} | ||
prerelease: true | ||
tag: ${{ github.ref }} | ||
body: | | ||
版本说明: ${{ github.event.head_commit.message }} | ||
文件说明: lsys.zip 为 windows x64 下编译版本,其他版本自行编译。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/.idea | ||
/.vscode | ||
/.history | ||
dump.rdb | ||
sdk/go/examples/sub_app/__debug_* | ||
sdk/go/.vscode/launch.json | ||
/server/*/.idea/* | ||
/server/.idea/* | ||
/build/* | ||
lsys.tar.gz | ||
lsys.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM rust:latest as rust_rust_builder | ||
WORKDIR /usr/src/lsys-web | ||
COPY ./server . | ||
RUN cargo build -r && sed -i 's|../../../ui/public/|./ui/|g' ./usr/src/lsys-web/examples/lsys-actix-web/config/app.toml | ||
|
||
FROM node:18-buster as node_builder | ||
WORKDIR /usr/src/lsys-web | ||
COPY ./ui . | ||
RUN cd ./web && npm run build && cd .. && cd ./web && npm run build | ||
|
||
FROM debian:buster-slim | ||
WORKDIR /usr/local/lsys-web | ||
RUN apt-get update && apt-get install -y libssl1.1 && rm -rf /var/lib/apt/lists/* | ||
|
||
ENV \ | ||
APP_HOST=127.0.0.1 \ | ||
APP_PORT=80 \ | ||
#APP_SSL_PORT=443 | ||
LOG_LEVEL=sqlx_core=info,lsys_sender=debug,axtix_web=debug,actix=info,mio=error,lsys_user=trace,lsys_web=trace,lsys_core=trace,lsys_user=trace,lsys_rbac=trace,lsys_docs=trace,lsys_actix_web=trace,sqlx=trace,redis=debug \ | ||
LOG_DIR="logs" \ | ||
LOG_NAME="std::out" \ | ||
#数据库配置 \ | ||
DATABASE_URL="mysql://root:[email protected]:3306/test2" \ | ||
#公共表前缀 | ||
DATABASE_TABLE_PREFIX="yaf_" \ | ||
#redis 配置 | ||
REDIS_URL="redis://127.0.0.1/" | ||
|
||
COPY --from=rust_builder /usr/src/lsys-web/examples/lsys-actix-web/static /usr/local/lsys-web/ | ||
COPY --from=rust_builder /usr/src/lsys-web/examples/lsys-actix-web/config /usr/local/lsys-web/ | ||
COPY --from=rust_builder /usr/src/lsys-web/examples/lsys-actix-web/locale /usr/local/lsys-web/ | ||
COPY --from=rust_builder /usr/src/lsys-web/examples/lsys-actix-web/data /usr/local/lsys-web/ | ||
COPY --from=rust_builder /usr/src/lsys-web/examples/lsys-actix-web/.env /usr/local/lsys-web/.env | ||
COPY --from=rust_builder /usr/src/lsys-web/examples/target/release/lsys-actix-web /usr/local/lsys-web/lsys-actix-web | ||
COPY --from=node_builder /usr/src/lsys-web/public /usr/local/lsys-web/ui | ||
CMD ["/usr/local/lsys-web/lsys-actix-web"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
mkdir build | ||
xcopy "README.MD" build /Y | ||
xcopy LICENSE build /Y | ||
|
||
mkdir server\\examples\\lsys-actix-web\data | ||
cd server\\examples\\lsys-actix-web | ||
cargo version | ||
rustc -V | ||
cargo update | ||
cargo build -r -vvv | ||
cd ..\\..\\.. | ||
|
||
xcopy /E /I /Y server\\assets build\\assets | ||
xcopy server\\target\\release\\lsys-actix-web.exe build /Y | ||
xcopy /E /I /Y server\\examples\\lsys-actix-web\\config build\\config | ||
xcopy /E /I /Y server\\examples\\lsys-actix-web\\data build\\data | ||
xcopy /E /I /Y server\\examples\\lsys-actix-web\\locale build\\locale | ||
xcopy /E /I /Y server\\examples\\lsys-actix-web\\static build\\static | ||
xcopy server\\examples\\lsys-actix-web\\.env build /Y | ||
|
||
cd ui\\web | ||
call npm install | ||
call npm run build | ||
cd ..\\.. | ||
mkdir ui\\public | ||
cd ui\\wap | ||
call npm install | ||
call npm run build | ||
cd ..\\.. | ||
mkdir ui\\public | ||
xcopy /E /I /Y ui\\public build\\ui | ||
|
||
|
||
powershell.exe -Command "(Get-Content -Path 'build\\config\\app.toml') | ForEach-Object { $_ -replace '../../../ui/public/', './ui/' } | Set-Content -Path 'build\\config\\app.toml'" | ||
|
||
cd build | ||
powershell.exe -Command "Compress-Archive -Path './' -DestinationPath '../lsys.zip'" | ||
cd .. | ||
|
||
echo The compilation was successful, please enable the service with ( ./lsys-actix-web ) to the service and access it via http://127.0.0.1:8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
mkdir -p build | ||
cp -fr ./README.MD ./build | ||
cp -fr ./LICENSE ./build | ||
# | ||
mkdir -p ./server/examples/lsys-actix-web/data | ||
cd ./server/examples/lsys-actix-web && cargo build \-r && cd ../../.. | ||
cp -fr ./server/assets ./build | ||
cp -fr ./server/target/release/lsys-actix-web ./build | ||
cp -fr ./server/examples/lsys-actix-web/config ./build | ||
cp -fr ./server/examples/lsys-actix-web/data ./build | ||
cp -fr ./server/examples/lsys-actix-web/locale ./build | ||
cp -fr ./server/examples/lsys-actix-web/static ./build | ||
cp -fr ./server/examples/lsys-actix-web/.env ./build | ||
# | ||
cd ui/web && npm i && npm run build && cd ../.. | ||
cd ui/wap && npm i && npm run build && cd ../.. | ||
cp -fr ./ui/public/ ./build/ui/ | ||
# | ||
if [ "$(uname)" = "Darwin" ]; then | ||
sed -i '' "s|../../../ui/public/|./ui/|g" ./build/config/app.toml | ||
else | ||
sed -i "s|../../../ui/public/|./ui/|g" ./build/config/app.toml | ||
fi | ||
|
||
cd ./build && tar -cvf ../lsys.tar.gz ./ && cd .. | ||
# | ||
echo -e "The compilation was successful, \ | ||
Please start the service with ( ./lsys-actix-web ) \ | ||
to start the service and access it via \033[1;32mhttp://127.0.0.1:8080\033[0m" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,9 @@ LOG_DIR="logs" | |
LOG_NAME="std::out" | ||
#LOG_GELF="127.0.0.1:12201" | ||
|
||
#jwt 密钥 ,修改将导致登陆失效 | ||
APP_JWT_KEY = "bbb" | ||
|
||
#数据库配置 | ||
DATABASE_URL="mysql://root:[email protected]:3306/test2" | ||
#公共表前缀 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
jwt-encode-error = JWT generation error:{$msg} | ||
wechat-parse-state-error= state error:{$msg} | ||
wechat-parse-state-error= state error:{$msg} | ||
time-format-error=Date parsing exception: {$msg} | ||
time-zone-error=Date time zone exception. | ||
area-db-error=Database exception:{$msg} | ||
area-error=System exception:{$msg} | ||
area-not-found=Address information not found. | ||
areaa-store-error=Store exception:{$msg} | ||
area-tantivy-error=Search exception:{$msg} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
app-error = Send error, details:{$msg} | ||
utf-error = String is not a valid UTF character, error details:{$msg} | ||
utf-parse-error = String is not a valid UTF character, error details:{$msg} | ||
valid-code-tag-len = Checksum KEY[{$tag}] max length:{$max} | ||
valid-code-submit-empty = The code is not empty. | ||
valid-code-not-match = The submitted code [{$code}] does not match. | ||
valid-code-not-match = The submitted code [{$code}] does not match. | ||
wait-notify-timeout=Wait to send timeout |
Oops, something went wrong.