worker/server
This commit is contained in:
parent
614806c52d
commit
f2745bf156
|
@ -9,7 +9,8 @@ RUN export GOROOT=/usr/local/go1.21.4 && \
|
||||||
export GOPRIVATE=gitlab.batiao8.com && \
|
export GOPRIVATE=gitlab.batiao8.com && \
|
||||||
export PATH=$PATH:$GOROOT/bin && \
|
export PATH=$PATH:$GOROOT/bin && \
|
||||||
go mod tidy && \
|
go mod tidy && \
|
||||||
go build cmd/enterprise.go && \
|
go build cmd/worker/worker.go && \
|
||||||
|
go build cmd/server/server.go && \
|
||||||
mv enterprise /app/bin && \
|
mv enterprise /app/bin && \
|
||||||
cp -r conf /app && \
|
cp -r conf /app && \
|
||||||
cp start.sh /app && \
|
cp start.sh /app && \
|
||||||
|
|
|
@ -5,7 +5,6 @@ import (
|
||||||
"enterprise/common/global"
|
"enterprise/common/global"
|
||||||
"enterprise/server"
|
"enterprise/server"
|
||||||
_ "enterprise/service/salary_calculator"
|
_ "enterprise/service/salary_calculator"
|
||||||
"enterprise/worker"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -13,8 +12,6 @@ func main() {
|
||||||
config.LoadAliPay()
|
config.LoadAliPay()
|
||||||
global.InitGlobal()
|
global.InitGlobal()
|
||||||
|
|
||||||
worker.InitCorp()
|
|
||||||
|
|
||||||
if err := server.Start(); err != nil {
|
if err := server.Start(); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"enterprise/common/config"
|
||||||
|
"enterprise/common/global"
|
||||||
|
_ "enterprise/service/salary_calculator"
|
||||||
|
"enterprise/worker"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
config.LoadServerConfig()
|
||||||
|
config.LoadAliPay()
|
||||||
|
global.InitGlobal()
|
||||||
|
|
||||||
|
worker.InitCorp()
|
||||||
|
select {}
|
||||||
|
}
|
Loading…
Reference in New Issue