This commit is contained in:
MengMengCode
2025-08-17 23:32:12 +08:00
parent 4c3f2cc562
commit f6fc47a2e8
3 changed files with 7 additions and 4 deletions

View File

@@ -35,7 +35,7 @@ RUN go mod download
COPY . .
# 从前端构建阶段复制构建好的静态文件
COPY --from=frontend-builder /app/dist ./web/dist
COPY --from=frontend-builder /app/frontend/dist ./web/dist
# 设置 musl 兼容参数(解决 pread64/pwrite64/off64_t 问题)
ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE=1 -D_GNU_SOURCE=1 -Doff64_t=off_t -Dpread64=pread -Dpwrite64=pwrite"
@@ -65,6 +65,9 @@ RUN addgroup -g 1001 -S mailcat && \
# 复制构建好的应用
COPY --from=go-builder /app/mailcat .
# 复制前端静态文件
COPY --from=go-builder /app/web/dist ./web/dist
# 复制配置文件模板
COPY --from=go-builder /app/config ./config

View File

@@ -6,7 +6,7 @@ database:
path: "./data/emails.db"
api:
auth_token: ""
auth_token: "your_auth_token"
admin:
password: ""
password: "your_admin_password"

View File

@@ -5,7 +5,7 @@ export default defineConfig({
plugins: [vue()],
base: '/admin/',
build: {
outDir: '../dist',
outDir: 'dist',
emptyOutDir: true,
rollupOptions: {
output: {