mirror of
https://github.com/239573049/FastGateway.git
synced 2026-10-24 02:19:13 +08:00
2b8bfc1666
chiseled 镜像以 UID 1654 运行,chmod 给宿主机登录用户不够。仪表盘改为展示真实错误,权限恢复后自动重试,compose 启动时 chown 数据目录。 Co-authored-by: Cursor <cursoragent@cursor.com>
32 lines
952 B
YAML
32 lines
952 B
YAML
services:
|
|
# chiseled 镜像以 UID 1654 运行且无 shell,无法在容器内 chown。
|
|
# 宿主机 bind mount 默认属主是创建目录的登录用户,统计库 / 证书会因此打不开。
|
|
fast-gateway-init-perms:
|
|
image: busybox:1.37
|
|
container_name: fast-gateway-init-perms
|
|
command: ["sh", "-c", "mkdir -p /data /certs && chown -R 1654:1654 /data /certs"]
|
|
volumes:
|
|
- ./data:/data
|
|
- ./certs:/certs
|
|
|
|
fast-gateway.service:
|
|
image: registry.cn-shenzhen.aliyuncs.com/token-ai/fast-gateway
|
|
container_name: fast-gateway
|
|
restart: always
|
|
user: "1654:1654"
|
|
depends_on:
|
|
fast-gateway-init-perms:
|
|
condition: service_completed_successfully
|
|
build:
|
|
context: .
|
|
dockerfile: src/FastGateway/Dockerfile
|
|
volumes:
|
|
- ./data:/app/data
|
|
- ./certs:/app/certs
|
|
ports:
|
|
- "8000:8080"
|
|
- "80:80"
|
|
- "443:443/udp"
|
|
- "443:443/tcp"
|
|
|