|
@@ -1,10 +1,13 @@
|
|
|
services:
|
|
services:
|
|
|
pipeline:
|
|
pipeline:
|
|
|
build: .
|
|
build: .
|
|
|
- # The image runs as the non-root `node` user for Kubernetes. For local dev
|
|
|
|
|
- # we override back to root so the ./output bind mount keeps working
|
|
|
|
|
- # regardless of the host user's uid; Kubernetes sets fsGroup instead.
|
|
|
|
|
- user: "0:0"
|
|
|
|
|
|
|
+ # Run as the image's non-root `node` user by default (uid 1000 == host
|
|
|
|
|
+ # `lkattey` here, and the same user Kubernetes runs the image as, so local
|
|
|
|
|
+ # compose mirrors prod's filesystem ownership). Bind-mounted files (./output,
|
|
|
|
|
+ # ./.data) therefore stay host-accessible instead of root-owned. On a host
|
|
|
|
|
+ # whose uid isn't 1000, set HOST_UID/HOST_GID (in .env or the shell) to your
|
|
|
|
|
+ # numeric uid:gid so the bind mounts match your user.
|
|
|
|
|
+ user: "${HOST_UID:-node}:${HOST_GID:-node}"
|
|
|
ports:
|
|
ports:
|
|
|
- "${PORT:-13000}:3000"
|
|
- "${PORT:-13000}:3000"
|
|
|
# Pass EVERY variable from .env (API keys, OSS, Feishu, SCHEDULES,
|
|
# Pass EVERY variable from .env (API keys, OSS, Feishu, SCHEDULES,
|
|
@@ -23,7 +26,10 @@ services:
|
|
|
- TIMEZONE=${TIMEZONE:-Asia/Shanghai}
|
|
- TIMEZONE=${TIMEZONE:-Asia/Shanghai}
|
|
|
volumes:
|
|
volumes:
|
|
|
- ./output:/app/output
|
|
- ./output:/app/output
|
|
|
- - pipeline-jobs:/tmp/pipeline-jobs
|
|
|
|
|
|
|
+ # Bind mount (pre-created as uid 1000 on the host) instead of a named
|
|
|
|
|
+ # volume: named volumes are root-owned, which the non-root container
|
|
|
|
|
+ # (uid 1000) below couldn't write to. .data is gitignored.
|
|
|
|
|
+ - ./.data/pipeline-jobs:/tmp/pipeline-jobs
|
|
|
# Use public DNS resolvers directly. The container inherits the host's
|
|
# Use public DNS resolvers directly. The container inherits the host's
|
|
|
# resolver, which can silently fail to resolve some public domains (e.g.
|
|
# resolver, which can silently fail to resolve some public domains (e.g.
|
|
|
# open.feishu.cn behind a VPN/proxy) and break the Feishu webhook. Override
|
|
# open.feishu.cn behind a VPN/proxy) and break the Feishu webhook. Override
|
|
@@ -32,6 +38,3 @@ services:
|
|
|
- ${DNS_SERVER_1:-223.5.5.5}
|
|
- ${DNS_SERVER_1:-223.5.5.5}
|
|
|
- ${DNS_SERVER_2:-114.114.114.114}
|
|
- ${DNS_SERVER_2:-114.114.114.114}
|
|
|
restart: unless-stopped
|
|
restart: unless-stopped
|
|
|
-
|
|
|
|
|
-volumes:
|
|
|
|
|
- pipeline-jobs:
|
|
|