优化file配置

This commit is contained in:
2026-07-31 17:08:00 +08:00
parent 45358ef40f
commit 8d09d737cc
2 changed files with 5 additions and 5 deletions
+1 -5
View File
@@ -107,7 +107,7 @@ services:
image: ${IMAGE_REPOSITORY}/file:${IMAGE_TAG}
container_name: firstleg-${DEPLOY_ENV:-test}-file
ports: ["${FILE_PORT:-9206}:9206"]
volumes: ["firstleg-file-data:/data/files"]
volumes: ["${FILE_UPLOADS_HOST_DIR:-/data/firstleg/uploads}:/data/files"]
environment:
<<: *common-environment
SERVER_PORT: 9206
@@ -177,7 +177,3 @@ networks:
infra-network:
external: true
name: ${INFRA_NETWORK:-firstleg-test-infra-network}
volumes:
firstleg-file-data:
name: firstleg-${DEPLOY_ENV:-test}-file-data
+4
View File
@@ -6,6 +6,10 @@ RUN addgroup -S app \
WORKDIR /app
# 预建运行时数据目录并归属 app 用户:命名卷首次挂载时会继承此属主,
# 否则 Docker 以 root:root 0755 创建挂载点,非 root 容器无法写入。
RUN mkdir -p /data/files && chown -R app:app /data
ARG JAR_FILE
COPY --chown=app:app ${JAR_FILE} /app/app.jar