feat(lab5): implement reliable image pipeline and track 2
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
# Compose file-based secrets inherit host ownership. Copy only the secrets
|
||||
# mounted for this role before dropping privileges.
|
||||
install -d -m 0700 -o appuser -g appuser /run/app-secrets
|
||||
for key in DATABASE_URL_FILE S3_ACCESS_KEY_ID_FILE S3_SECRET_ACCESS_KEY_FILE BROKER_URL_FILE; do
|
||||
source_file=$(printenv "$key") || continue
|
||||
target="/run/app-secrets/$key"
|
||||
install -m 0400 -o appuser -g appuser "$source_file" "$target"
|
||||
export "$key=$target"
|
||||
done
|
||||
exec setpriv --reuid=appuser --regid=appuser --init-groups -- "$@"
|
||||
Reference in New Issue
Block a user