Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
system_pay
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王沛
system_pay
Commits
51467a71
Commit
51467a71
authored
Jun 20, 2023
by
wangp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
e8ed663e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
2 deletions
+72
-2
Dockerfile
Dockerfile
+49
-0
app.conf
conf/test/app.conf
+1
-1
docker-compose.yaml
docker-compose.yaml
+21
-0
lastupdate.tmp
lastupdate.tmp
+1
-1
No files found.
Dockerfile
0 → 100644
View file @
51467a71
# 声明镜像来源为golang:alpine
FROM
golang:alpine
# 设置环境变量GO111MODULE为on
ENV
GO111MODULE=on
# 设置环境变量GOPROXY为https://goproxy.io,direct
ENV
GOPROXY=https://goproxy.cn,direct
# 声明工作目录
WORKDIR
/go/src/system_pay
# 拷贝当前工程代码到工作目录
COPY
. .
# go env为查看go的环境变量, go build -o server . 为打包项目,二进制
RUN
go
env
&&
go mod tidy
&&
go build
-o
server .
# ======= 以下为多阶段构建 =======
# 声明镜像来源为alpine:latest
FROM
alpine:latest
ENV
TZ=Asia/Shanghai
RUN
echo
"http://mirrors.aliyun.com/alpine/v3.4/main/"
>
/etc/apk/repositories
\
&&
apk
--no-cache
add tzdata zeromq
\
&&
ln
-snf
/usr/share/zoneinfo/
$TZ
/etc/localtime
\
&&
echo
'$TZ'
>
/etc/timezone
# 声明工作目录
WORKDIR
/go/src/system_pay
# 拷贝配置文件到当前工作目录
COPY
--from=0 /go/src/shop_business_back/conf/test ./conf
# 拷贝打包好的server二进制文件到当前工作目录
# COPY --from=0 /go/src/system_pay/server ./
# 拷贝配置文件到当前工作目录
# COPY --from=0 /go/src/system_pay/conf ./conf
# 拷贝国际化文件夹到当前工作目录
# COPY --from=0 /go/src/system_pay/i18n ./i18n
# 拷贝国际化文件夹到当前工作目录
# COPY --from=0 /go/src/system_pay/docs ./docs
# 运行打包好的二进制
ENTRYPOINT
./server
\ No newline at end of file
conf/test/app.conf
View file @
51467a71
...
...
@@ -6,7 +6,7 @@ runmode = test
autorender
=
false
copyrequestbody
=
true
EnableDocs
=
true
httpport
=
9093
httpport
=
14999
sessionon
=
true
#数据库配置
...
...
docker-compose.yaml
0 → 100644
View file @
51467a71
version
:
'
3.5'
services
:
system_pay_dev
:
restart
:
always
build
:
context
:
.
args
:
ENVARG
:
dev
dockerfile
:
Dockerfile
image
:
system_pay:dev
ports
:
-
14999:14999
environment
:
runmode
:
dev
networks
:
-
system_pay_network
container_name
:
system_data_pay
networks
:
system_pay_network
:
driver
:
bridge
lastupdate.tmp
View file @
51467a71
{"/Users/wangp/go/src/system_pay/controllers/account":1587983537752490638,"/Users/wangp/go/src/system_pay/controllers/certification":1637914736191257052,"/Users/wangp/go/src/system_pay/controllers/common":1672909668706518832,"/Users/wangp/go/src/system_pay/controllers/coupon":1589449743292364338,"/Users/wangp/go/src/system_pay/controllers/credit":1666332119650014444,"/Users/wangp/go/src/system_pay/controllers/equipment":1619597331058913530,"/Users/wangp/go/src/system_pay/controllers/index":1687167540586756398,"/Users/wangp/go/src/system_pay/controllers/month":1646903306025250067}
\ No newline at end of file
{"/Users/wangp/go/src/system_pay/controllers/index":1687167540586756349}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment