mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-03 16:07:46 +08:00
- 绑定地址固定 0.0.0.0,仅通过 APP_PORT 控制端口,简化 CLI/Docker/systemd/dev.sh/前端代理全链路 - 新增 API_KEY_PREFIX 环境变量,抽取 handlers/shared/api_keys.rs 消除 admin/public 重复逻辑 - 新增 bootstrap_admin.rs,启动时通过 ADMIN_* 环境变量在无管理员时自动创建首个本地管理员 - 前端密码输入改用 type=password,API Key 占位符改为动态前缀 - 删除过时的 pyproject.toml/uv.lock 和旧部署文档 - 更新 .env.example/README 反映新配置项
32 lines
1.0 KiB
Docker
32 lines
1.0 KiB
Docker
# syntax=docker/dockerfile:1
|
|
# Aether Gateway 运行时镜像(交叉编译方案)
|
|
# 二进制和前端产物均由 CI 预先构建,此 Dockerfile 仅做打包
|
|
# 用法: docker buildx build --platform linux/amd64,linux/arm64 -f Dockerfile.app .
|
|
#
|
|
# 构建上下文中须包含:
|
|
# dist/aether-gateway-amd64 (x86_64-unknown-linux-musl 交叉编译产物)
|
|
# dist/aether-gateway-arm64 (aarch64-unknown-linux-musl 交叉编译产物)
|
|
# dist/frontend/ (npm run build 产物)
|
|
|
|
FROM gcr.io/distroless/static-debian12
|
|
|
|
# TARGETARCH 由 buildx 自动注入: amd64 或 arm64
|
|
ARG TARGETARCH
|
|
|
|
COPY dist/aether-gateway-${TARGETARCH} /usr/local/bin/aether-gateway
|
|
COPY dist/frontend/ /srv/frontend
|
|
|
|
WORKDIR /app
|
|
|
|
ENV RUST_LOG=aether_gateway=info \
|
|
APP_PORT=8084 \
|
|
AETHER_GATEWAY_STATIC_DIR=/srv/frontend
|
|
|
|
EXPOSE 8084
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD ["/usr/local/bin/aether-gateway", "--healthcheck"]
|
|
|
|
USER root
|
|
ENTRYPOINT ["/usr/local/bin/aether-gateway"]
|