CFG: Gitea act_runner 自动部署(Go 交叉编译 + Docker 重建容器)+ 生产镜像 Dockerfile
Some checks failed
Build and Deploy (service.xpcool.com) / build-and-deploy (push) Failing after 4m6s
Some checks failed
Build and Deploy (service.xpcool.com) / build-and-deploy (push) Failing after 4m6s
- .gitea/workflows/deploy.yml:push main/dev → Go1.23 交叉编译(linux/amd64) → 组装 main+manifest/config+resource → docker build → 重建容器 127.0.0.1:10100(xpcool-net, GF_GCFG_ENV=prod, secrets: DB_DSN/JWT_SECRET)→ /api.json 冒烟 - deploy/Dockerfile:alpine 最小运行时(main + manifest/config + resource,EXPOSE 10100) - 新增 009_admin_account_v2.sql(超管账号替换 xxcool)已含在本仓
This commit is contained in:
parent
4aca0c7f6f
commit
361e063b80
23
deploy/Dockerfile
Normal file
23
deploy/Dockerfile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# service.xpcool.com 生产容器镜像(alpine 最小运行时)
|
||||||
|
# 由 .gitea/workflows/deploy.yml 构建;本地手动构建亦可:
|
||||||
|
# cd <部署目录> && docker build -f deploy/Dockerfile -t service.xpcool.com:latest .
|
||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
# 时区与健康检查工具
|
||||||
|
RUN apk add --no-cache tzdata curl \
|
||||||
|
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||||
|
&& echo "Asia/Shanghai" > /etc/timezone
|
||||||
|
|
||||||
|
ENV WORKDIR /app
|
||||||
|
WORKDIR $WORKDIR
|
||||||
|
|
||||||
|
# GoFrame 运行所需:二进制 + 配置(基础 config.yaml + 环境化 config.prod.yaml)+ 静态资源
|
||||||
|
COPY main $WORKDIR/main
|
||||||
|
COPY manifest/config $WORKDIR/manifest/config
|
||||||
|
COPY resource/public $WORKDIR/public
|
||||||
|
COPY resource/template $WORKDIR/template
|
||||||
|
|
||||||
|
RUN chmod +x $WORKDIR/main
|
||||||
|
|
||||||
|
EXPOSE 10100
|
||||||
|
CMD ["./main"]
|
||||||
Loading…
Reference in New Issue
Block a user