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
b750616b
Commit
b750616b
authored
Jun 20, 2023
by
wangp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
41bff4c3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
17 deletions
+7
-17
Dockerfile
Dockerfile
+3
-3
app.conf
conf/app.conf
+1
-1
docker-compose.yaml
docker-compose.yaml
+1
-1
prod.sh
prod.sh
+2
-12
No files found.
Dockerfile
View file @
b750616b
...
...
@@ -14,8 +14,8 @@ WORKDIR /go/src/system_pay
COPY
. .
# go env为查看go的环境变量, go build -o server . 为打包项目,二进制
RUN
go
env
&&
go mod tidy
&&
go build
-o
server .
# RUN go env && go mod tidy
&& go get -u golang.org/x/sys && go build -o server .
#
RUN go env && go mod tidy && go build -o server .
RUN
go
env
&&
go mod tidy
&&
go get
-u
golang.org/x/sys
&&
go build
-o
server .
# ======= 以下为多阶段构建 =======
...
...
@@ -32,7 +32,7 @@ RUN echo "http://mirrors.aliyun.com/alpine/v3.4/main/" > /etc/apk/repositories \
WORKDIR
/go/src/system_pay
# 拷贝配置文件到当前工作目录
COPY
--from=0 /go/src/system_pay/conf
/test ./conf/test
COPY
--from=0 /go/src/system_pay/conf
./conf
# 拷贝打包好的server二进制文件到当前工作目录
COPY
--from=0 /go/src/system_pay/server ./
...
...
conf/app.conf
View file @
b750616b
...
...
@@ -6,7 +6,7 @@ runmode = dev
autorender
=
false
copyrequestbody
=
true
EnableDocs
=
true
httpport
=
9077
httpport
=
14999
sessionon
=
true
#数据库配置
...
...
docker-compose.yaml
View file @
b750616b
...
...
@@ -14,7 +14,7 @@ services:
runmode
:
dev
networks
:
-
system_pay_network
container_name
:
system_
data_pay
container_name
:
system_
pay_dev
networks
:
system_pay_network
:
...
...
prod.sh
View file @
b750616b
#!/bin/bash
#git pull
#docker-compose -f docker-compose.yaml up --build -d
#docker image prune -f
git pull
export
runmode
=
dev
docker-compose up
--build
-d
docker image prune
-f-bash-4
.2#
docker-compose
-f
docker-compose.yaml up
--build
-d
docker image prune
-f
\ 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