正在显示
3 个修改的文件
包含
28 行增加
和
16 行删除
DockerfileBase
已删除
100644 → 0
1 | -FROM golang:1.19-alpine as builder | ||
2 | - | ||
3 | -# Define the project name | 定义项目名称 | ||
4 | -ARG PROJECT=core | ||
5 | - | ||
6 | -WORKDIR /build | ||
7 | -COPY . . | ||
8 | - | ||
9 | -RUN go env -w GO111MODULE=on \ | ||
10 | - && go env -w GOPROXY=https://goproxy.cn,direct \ | ||
11 | - && go env -w CGO_ENABLED=0 \ | ||
12 | - && go env \ | ||
13 | - && go mod tidy \ | ||
14 | - && cd cmd/chart-server/api \ | ||
15 | - && go build -ldflags="-s -w" -o /build/api/${PROJECT} ${PROJECT}.go |
@@ -19,7 +19,7 @@ FROM alpine:latest | @@ -19,7 +19,7 @@ FROM alpine:latest | ||
19 | # Define the project name | 定义项目名称 | 19 | # Define the project name | 定义项目名称 |
20 | ARG PROJECT=core | 20 | ARG PROJECT=core |
21 | # Define the config file name | 定义配置文件名 | 21 | # Define the config file name | 定义配置文件名 |
22 | -ARG CONFIG_FILE=core-dev.yaml | 22 | +ARG CONFIG_FILE=core-prod.yaml |
23 | # Define the author | 定义作者 | 23 | # Define the author | 定义作者 |
24 | ARG AUTHOR=785409885@qq.com | 24 | ARG AUTHOR=785409885@qq.com |
25 | 25 | ||
@@ -31,6 +31,7 @@ ENV CONFIG_FILE=${CONFIG_FILE} | @@ -31,6 +31,7 @@ ENV CONFIG_FILE=${CONFIG_FILE} | ||
31 | 31 | ||
32 | COPY --from=builder /build/api/${PROJECT} ./ | 32 | COPY --from=builder /build/api/${PROJECT} ./ |
33 | COPY --from=builder /build/cmd/chart-server/api/etc/${CONFIG_FILE} ./etc/ | 33 | COPY --from=builder /build/cmd/chart-server/api/etc/${CONFIG_FILE} ./etc/ |
34 | +COPY --from=builder /build/cmd/chart-server/api/public ./public/ | ||
34 | 35 | ||
35 | EXPOSE 8080 | 36 | EXPOSE 8080 |
36 | ENTRYPOINT ./${PROJECT} -f etc/${CONFIG_FILE} | 37 | ENTRYPOINT ./${PROJECT} -f etc/${CONFIG_FILE} |
cmd/chart-server/api/etc/core-prd.yaml
0 → 100644
1 | +Name: chart | ||
2 | +Host: 0.0.0.0 | ||
3 | +Port: 8080 | ||
4 | +Verbose: false | ||
5 | +HostName: http://sumifcc-bchart.sumifcc.com | ||
6 | + | ||
7 | +Log: | ||
8 | + Mode: file | ||
9 | + Encoding: plain | ||
10 | + Level: info | ||
11 | + | ||
12 | +JwtAuth: | ||
13 | + AccessSecret: digital-platform | ||
14 | + Expire: 360000 | ||
15 | + | ||
16 | +Redis: | ||
17 | + Host: 192.168.0.243:6379 | ||
18 | + Type: node | ||
19 | + Pass: | ||
20 | +DB: | ||
21 | + DataSource: host=114.55.200.59 user=postgres password=eagle1010 dbname=sumifcc-bchart port=31543 sslmode=disable TimeZone=Asia/Shanghai | ||
22 | + | ||
23 | +ByteMetadata: | ||
24 | + Name: ApiByteMetadata | ||
25 | + Host: https://character-library-metadata-bastion.sumifcc.com | ||
26 | + Timeout: 0s |
-
请 注册 或 登录 后发表评论