mirror of
git://f0xx.org/ac/ac-deploy
synced 2026-08-12 18:12:19 +03:00
Deploy: stop rsync --delete from wiping builder builds/ artifacts.
Exclude builds/ and .docker from broadcast sync; re-run prepare-be-builder-dirs after deploy so nobody retains write access to artifact trees. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -12,12 +12,21 @@ DOWNLOADS="${2:-/var/www/localhost/htdocs/apps/app/androidcast_project/downloads
|
||||
OTA_ROOT="${3:-/var/www/localhost/htdocs/apps/app/androidcast_project/ota-artifacts}"
|
||||
|
||||
mkdir -p "${BUILDS}" "${DOCKER_HOME}/.docker" "${DOWNLOADS}" "${OTA_ROOT}/v0/ota/channel"
|
||||
chown -R nginx:nginx "${BROADCAST_ROOT}" "${DOWNLOADS}" "${OTA_ROOT}" 2>/dev/null || true
|
||||
|
||||
# Do not chown -R broadcast root: that resets builds/* to nginx and breaks PHP-FPM (nobody).
|
||||
for _d in config bin deploy sql src public; do
|
||||
if [ -d "${BROADCAST_ROOT}/${_d}" ]; then
|
||||
chown -R nginx:nginx "${BROADCAST_ROOT}/${_d}" 2>/dev/null || true
|
||||
fi
|
||||
done
|
||||
chown -R nginx:nginx "${DOWNLOADS}" "${OTA_ROOT}" 2>/dev/null || true
|
||||
chmod -R 775 "${DOWNLOADS}" "${OTA_ROOT}" 2>/dev/null || true
|
||||
|
||||
# PHP-FPM www pool is often nobody; artifact dirs must be writable by that user.
|
||||
chown nobody:nginx "${BUILDS}" 2>/dev/null || true
|
||||
chmod 2775 "${BUILDS}" 2>/dev/null || true
|
||||
find "${BUILDS}" -mindepth 1 -maxdepth 1 -type d -exec chown nobody:nginx {} \; 2>/dev/null || true
|
||||
find "${BUILDS}" -mindepth 1 -maxdepth 1 -type d -exec chmod 2775 {} \; 2>/dev/null || true
|
||||
chown nobody:nobody "${DOCKER_HOME}/.docker" 2>/dev/null || true
|
||||
chmod 775 "${DOCKER_HOME}/.docker" 2>/dev/null || true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user