Browse Source

Merge branch 'dev' of https://git.tonyandmoney.cn/tuonian/nginx-ui into dev

niantuo 1 year ago
parent
commit
357ba49b21
6 changed files with 11 additions and 47 deletions
  1. 7 8
      build-server.sh
  2. 3 3
      conf/app.conf
  3. 1 1
      docker/Dockerfile
  4. 0 35
      server/conf/app.conf
  5. BIN
      server/data/db/sqlite.db
  6. 0 0
      server/static/web/web

+ 7 - 8
build-server.sh

@@ -1,17 +1,16 @@
 #!/bin/bash
 CURRENT_DIR=$(cd $(dirname $0); pwd)
 
-mkdir -p ./local
-mkdir -p ./local/data/db
-cp -rf ./server/conf ./local
-cp -rf ./server/static ./local
+mkdir -p local/data/db
+mkdir -p local/static/web
+
+cp -rf ./conf ./local
 
-cd ./server
 export GOODS=linux
 export GOARCH=amd64
-go build server/main.go -o ../local/server
-cd $CURRENT_DIR
-cp -rf ./dist/* ./local/static/web/
+go build -o local/server  server/main.go
+
+cp -rf ./frontend/dist/* ./local/static/web/
 rm -rf ./local/static/web/config.js
 chmod +x ./local/server
 

+ 3 - 3
conf/app.conf

@@ -1,5 +1,5 @@
 appname = server
-httpport = 38080
+httpport = 8080
 runmode = dev
 copyrequestbody = true
 
@@ -11,8 +11,8 @@ dbdir = ./data/db
 nginxPath = /usr/sbin/nginx
 nginxDir = /etc/nginx
 
-admin_password = admin123
-reset_admin_password = true
+admin_password =
+reset_admin_password =
 
 sessionon = true
 sessionprovider = file

+ 1 - 1
docker/Dockerfile

@@ -7,7 +7,7 @@ ARG GOARCH=amd64
 RUN go env -w GOPROXY=https://goproxy.cn,direct
 
 RUN --mount=type=cache,target=/go --mount=type=cache,target=/root/.cache/go-build\
-    GOODS=${GOODS} GOARCH=${GOARCH} go build server/main.go -o /app/app
+    GOODS=${GOODS} GOARCH=${GOARCH} go build -o /app/app  server/main.go
 
 FROM debian:sid-slim
 

+ 0 - 35
server/conf/app.conf

@@ -1,35 +0,0 @@
-appname = server
-httpport = 8080
-runmode = dev
-copyrequestbody = true
-
-baseApi = /nginx-ui/api
-contextpath = /nginx-ui
-
-datadir = ./data
-dbdir = ./data/db
-nginxPath = /usr/sbin/nginx
-nginxDir = /etc/nginx
-
-admin_password =
-reset_admin_password =
-
-sessionon = true
-sessionprovider = file
-sessionname = nginx_session
-sessiongcmaxlifetime = 7200
-sessionproviderconfig = "./data/sessions"
-
-thirdsessionenable = false
-thirdsessionname =
-thirdsessioncheckurl =
-
-
-oauth2_client_id =
-oauth2_client_secret =
-oauth2_authorize_endpoint =
-oauth2_token_endpoint =
-oauth2_redirect_uri =
-oauth2_scopes = ""
-oauth2_userinfo =
-oauth2_enable = false

BIN
server/data/db/sqlite.db


+ 0 - 0
server/static/web/web