init the project
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
server{
|
||||
listen 80;
|
||||
server_name tank.zicpo.cn;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:9090;
|
||||
proxy_set_header host $host;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_pass_request_headers on;
|
||||
client_max_body_size 2048m;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"ServerPort": 9090,
|
||||
"LogToConsole": true,
|
||||
"MysqlPort": 3306,
|
||||
"MysqlHost": "127.0.0.1",
|
||||
"MysqlSchema": "tank",
|
||||
"MysqlUserName": "tank",
|
||||
"MysqlPassword": "tank123",
|
||||
"AdminUsername": "admin",
|
||||
"AdminEmail": "admin@tank.eyeblue.cn",
|
||||
"AdminPassword": "123456"
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html><head><title>tank-front</title><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge,chrome=1"><meta name=renderer content=webkit><meta name=viewport content="user-scalable=no,width=device-width,initial-scale=1,maximum-scale=1"><meta name=msapplication-tap-highlight content=no><meta name=apple-mobile-web-app-capable content=yes><link href=/static/css/app.cfd8f574917fd86fad8effb02f5563b2.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.67df5041971dde987922.js></script><script type=text/javascript src=/static/js/vendor.392879af4bb24a810ba3.js></script><script type=text/javascript src=/static/js/app.64233513a41451689d54.js></script></body></html>
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 434 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 134 KiB |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
||||
!function(e){function __webpack_require__(r){if(_[r])return _[r].exports;var t=_[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,__webpack_require__),t.l=!0,t.exports}var r=window.webpackJsonp;window.webpackJsonp=function(_,n,o){for(var c,a,i,u=0,p=[];u<_.length;u++)a=_[u],t[a]&&p.push(t[a][0]),t[a]=0;for(c in n)Object.prototype.hasOwnProperty.call(n,c)&&(e[c]=n[c]);for(r&&r(_,n,o);p.length;)p.shift()();if(o)for(u=0;u<o.length;u++)i=__webpack_require__(__webpack_require__.s=o[u]);return i};var _={},t={2:0};__webpack_require__.e=function(e){function onScriptComplete(){o.onerror=o.onload=null,clearTimeout(c);var r=t[e];0!==r&&(r&&r[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}var r=t[e];if(0===r)return new Promise(function(e){e()});if(r)return r[2];var _=new Promise(function(_,n){r=t[e]=[_,n]});r[2]=_;var n=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,__webpack_require__.nc&&o.setAttribute("nonce",__webpack_require__.nc),o.src=__webpack_require__.p+"static/js/"+e+"."+{0:"392879af4bb24a810ba3",1:"64233513a41451689d54"}[e]+".js";var c=setTimeout(onScriptComplete,12e4);return o.onerror=o.onload=onScriptComplete,n.appendChild(o),_},__webpack_require__.m=e,__webpack_require__.c=_,__webpack_require__.d=function(exports,e,r){__webpack_require__.o(exports,e)||Object.defineProperty(exports,e,{configurable:!1,enumerable:!0,get:r})},__webpack_require__.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(r,"a",r),r},__webpack_require__.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},__webpack_require__.p="/",__webpack_require__.oe=function(e){throw console.error(e),e}}([]);
|
||||
//# sourceMappingURL=manifest.67df5041971dde987922.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,68 @@
|
||||
@if "%DEBUG%" == "" echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Tank build script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
|
||||
|
||||
@REM ==== START VALIDATION ====
|
||||
if "%GOPATH%"=="" (
|
||||
echo The GOPATH environment variable is not defined correctly
|
||||
goto end
|
||||
)
|
||||
|
||||
set PRE_DIR=%cd%
|
||||
|
||||
cd %GOPATH%
|
||||
|
||||
echo golang.org . Please download from: https://github.com/MXi4oyu/golang.org and put in the directory with same level of github.com
|
||||
@rem echo go get golang.org/x
|
||||
@rem go get golang.org/x
|
||||
|
||||
@rem resize image
|
||||
echo go get github.com/disintegration/imaging
|
||||
go get github.com/disintegration/imaging
|
||||
|
||||
@rem json parser
|
||||
echo go get github.com/json-iterator/go
|
||||
go get github.com/json-iterator/go
|
||||
|
||||
|
||||
@rem mysql
|
||||
echo go get github.com/go-sql-driver/mysql
|
||||
go get github.com/go-sql-driver/mysql
|
||||
|
||||
@rem dao database
|
||||
echo go get github.com/jinzhu/gorm
|
||||
go get github.com/jinzhu/gorm
|
||||
|
||||
|
||||
@rem uuid
|
||||
echo go get github.com/nu7hatch/gouuid
|
||||
go get github.com/nu7hatch/gouuid
|
||||
|
||||
echo build tank ...
|
||||
go install tank
|
||||
|
||||
echo packaging
|
||||
set distPath=%GOPATH%\src\tank\dist
|
||||
if exist %distPath% (
|
||||
echo clear %distPath%
|
||||
rmdir /s/q %distPath%
|
||||
)
|
||||
|
||||
echo create directory %distPath%
|
||||
md %distPath%
|
||||
|
||||
echo copying tank.exe
|
||||
copy %GOPATH%\bin\tank.exe %distPath%
|
||||
|
||||
echo copying build
|
||||
xcopy %GOPATH%\src\tank\build %distPath% /e/h
|
||||
|
||||
cd %PRE_DIR%
|
||||
|
||||
echo check the dist file in %distPath%
|
||||
echo finish!
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
EXE_PATH=$GOPATH/bin/tank
|
||||
|
||||
EDASPID=`ps -ef | grep "$EXE_PATH"|grep -v grep |head -n 1 | awk '{print $2}'`
|
||||
if [ -z $EDASPID ];
|
||||
then
|
||||
echo "Cannot find $EXE_PATH."
|
||||
else
|
||||
kill -9 $EDASPID
|
||||
echo $EXE_PATH
|
||||
echo 'Shutdown successfully.'
|
||||
fi
|
||||
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# executable path
|
||||
EXE_PATH=$GOPATH/bin/tank
|
||||
|
||||
# execute arguments
|
||||
MysqlHost=127.0.0.1
|
||||
MysqlPort=3306
|
||||
MysqlSchema=tank
|
||||
MysqlUserName=tank
|
||||
MysqlPassword=Tank_123
|
||||
|
||||
AdminUsername=admin
|
||||
AdminEmail=lish516@126.com
|
||||
AdminPassword=123456
|
||||
|
||||
if [ -f "$EXE_PATH" ]; then
|
||||
nohup $EXE_PATH -MysqlHost=$MysqlHost -MysqlPort=$MysqlPort -MysqlSchema=$MysqlSchema -MysqlUserName=$MysqlUserName -MysqlPassword=$MysqlPassword -AdminUsername=$AdminUsername -AdminEmail=$AdminEmail -AdminPassword=$AdminPassword >/dev/null 2>&1 &
|
||||
else
|
||||
echo 'Cannot find $EXE_PATH.'
|
||||
exit 1
|
||||
fi
|
||||
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
homePath=$GOPATH/src/tank
|
||||
|
||||
oldPath=$(pwd)
|
||||
|
||||
echo "cd homePath"
|
||||
cd $homePath
|
||||
|
||||
echo "shutdown tank"
|
||||
source $homePath/doc/script/shutdown.sh
|
||||
|
||||
echo "git reset"
|
||||
git reset --hard HEAD
|
||||
|
||||
echo "git pull"
|
||||
git pull
|
||||
|
||||
echo "go install tank"
|
||||
go install tank
|
||||
|
||||
cd $oldPath
|
||||
|
||||
echo "startup tank"
|
||||
source $homePath/doc/script/startup.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user