service.xpcool.com/deploy/Dockerfile
夏犀麟 361e063b80
Some checks failed
Build and Deploy (service.xpcool.com) / build-and-deploy (push) Failing after 4m6s
CFG: Gitea act_runner 自动部署(Go 交叉编译 + Docker 重建容器)+ 生产镜像 Dockerfile
- .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)已含在本仓
2026-08-26 23:55:46 +08:00

24 lines
773 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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"]