Files
yuming d6daf1dce6 二次开发:补全 PRO 功能 + 优化体验
- 新增站点自定义(标题/Favicon/登录页描述)
- 新增在线自定义 CSS/JS 编辑器
- 扩展备份迁移支持面板配置导出导入
- 默认账号改为 admin/1234
- 设置按钮改为橙色更醒目
- 修复登录页误报"登录过期"弹窗
- 修复 i18n 双重 apps 块导致翻译失效

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 14:29:03 +08:00

65 lines
1.6 KiB
Docker
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.
# build frontend
FROM node AS web_image
# 华为源
# RUN npm config set registry https://repo.huaweicloud.com/repository/npm/
RUN npm install pnpm@8 -g
WORKDIR /build
COPY ./package.json /build
COPY ./pnpm-lock.yaml /build
RUN pnpm install
COPY . /build
RUN pnpm run build
# build backend
# 最新alpine3.19导致sqlite3编译失败(https://github.com/mattn/go-sqlite3/issues/1164
# 临时解决方案:https://github.com/mattn/go-sqlite3/pull/1177)
# sun-panel暂时解决方案使用golang:1.21-alpine3.18(因旧版本使用没问题,短期内较稳定)
FROM golang:1.21-alpine3.18 as server_image
WORKDIR /build
COPY ./service .
# 中国国内源
# RUN sed -i "s@dl-cdn.alpinelinux.org@mirrors.aliyun.com@g" /etc/apk/repositories \
# && go env -w GOPROXY=https://goproxy.cn,direct
RUN apk add --no-cache bash curl gcc git musl-dev
RUN go env -w GO111MODULE=on \
&& export PATH=$PATH:/go/bin \
&& go install -a -v github.com/go-bindata/go-bindata/...@latest \
&& go install -a -v github.com/elazarl/go-bindata-assetfs/...@latest \
&& go-bindata-assetfs -o=assets/bindata.go -pkg=assets assets/... \
&& go build -o sun-panel --ldflags="-X sun-panel/global.RUNCODE=release -X sun-panel/global.ISDOCKER=docker" main.go
# run_image
FROM alpine
WORKDIR /app
COPY --from=web_image /build/dist /app/web
COPY --from=server_image /build/sun-panel /app/sun-panel
# 中国国内源
# RUN sed -i "s@dl-cdn.alpinelinux.org@mirrors.aliyun.com@g" /etc/apk/repositories
EXPOSE 3002
RUN apk add --no-cache bash ca-certificates su-exec tzdata \
&& chmod +x ./sun-panel \
&& ./sun-panel -config
CMD ./sun-panel