Use numeric container ownership during preview setup
Unified application CI and deployment / static-checks (push) Successful in 5s
Remote development preview source sync / sync-source (push) Failing after 4m54s
Unified application CI and deployment / static-checks (pull_request) Successful in 5s
python CI and deployment / static-checks (pull_request) Successful in 3s
Unified application CI and deployment / verify-and-release (push) Has been skipped
Unified application CI and deployment / verify-and-release (pull_request) Has been skipped
python CI and deployment / verify-and-deploy (pull_request) Has been skipped
Unified application CI and deployment / static-checks (push) Successful in 5s
Remote development preview source sync / sync-source (push) Failing after 4m54s
Unified application CI and deployment / static-checks (pull_request) Successful in 5s
python CI and deployment / static-checks (pull_request) Successful in 3s
Unified application CI and deployment / verify-and-release (push) Has been skipped
Unified application CI and deployment / verify-and-release (pull_request) Has been skipped
python CI and deployment / verify-and-deploy (pull_request) Has been skipped
This commit is contained in:
@@ -20,7 +20,8 @@ actual=$(docker run --rm --entrypoint node \
|
||||
"$IMAGE" /tmp/preview-fingerprint.mjs /repo)
|
||||
[[ "$actual" == "$expected" ]] || { echo 'Tooling image does not match preview dependencies/configuration/schema' >&2; exit 1; }
|
||||
install -d -m 0700 "$ROOT"
|
||||
install -d -m 0755 -o 1000 -g 1000 "$ROOT/source" "$ROOT/status"
|
||||
install -d -m 0755 "$ROOT/source" "$ROOT/status"
|
||||
chown 1000:1000 "$ROOT/source" "$ROOT/status"
|
||||
# Create independent preview credentials only once, never copy production secrets.
|
||||
if [ ! -s "$ROOT/env" ]; then
|
||||
ROOT="$ROOT" IMAGE="$IMAGE" PORT="$PORT" python3 - <<'PY'
|
||||
@@ -32,7 +33,7 @@ with p.open('x') as f:
|
||||
for key in ['POSTGRES_PASSWORD','S3_ACCESS_KEY','S3_SECRET_KEY']:f.write(key+'='+secrets.token_hex(24)+'\n')
|
||||
PY
|
||||
fi
|
||||
rsync -a --delete --chown=1000:1000 \
|
||||
rsync -a --delete --numeric-ids --chown=1000:1000 \
|
||||
--exclude='.git' --exclude='node_modules' --exclude='.next' --exclude='dist' \
|
||||
--exclude='*.tsbuildinfo' --exclude='.env' --exclude='.env.*' --exclude='.gitea' \
|
||||
"$SOURCE/" "$ROOT/source/"
|
||||
|
||||
Reference in New Issue
Block a user