mirror of
git://f0xx.org/ac/ac-deploy
synced 2026-08-12 18:12:19 +03:00
Lab builder dirs: nobody-owned builds/; fix broadcast config path.
PHP-FPM user nobody must write artifact subdirs; point builder notify at deployed ac-ms-broadcast config under /var/www/ac/broadcast. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -13,14 +13,17 @@ OTA_ROOT="${3:-/var/www/localhost/htdocs/apps/app/androidcast_project/ota-artifa
|
|||||||
|
|
||||||
mkdir -p "${BUILDS}" "${DOCKER_HOME}/.docker" "${DOWNLOADS}" "${OTA_ROOT}/v0/ota/channel"
|
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
|
chown -R nginx:nginx "${BROADCAST_ROOT}" "${DOWNLOADS}" "${OTA_ROOT}" 2>/dev/null || true
|
||||||
chmod -R 775 "${BUILDS}" "${DOCKER_HOME}/.docker" "${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
|
||||||
|
chown nobody:nobody "${DOCKER_HOME}/.docker" 2>/dev/null || true
|
||||||
|
chmod 775 "${DOCKER_HOME}/.docker" 2>/dev/null || true
|
||||||
|
|
||||||
# PHP-FPM www pool is often nobody; builds run as that user.
|
|
||||||
if getent group docker >/dev/null 2>&1; then
|
if getent group docker >/dev/null 2>&1; then
|
||||||
usermod -aG docker nobody 2>/dev/null || true
|
usermod -aG docker nobody 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
chown nobody:nobody "${DOCKER_HOME}/.docker" 2>/dev/null || true
|
|
||||||
chmod 775 "${DOCKER_HOME}/.docker" 2>/dev/null || true
|
|
||||||
|
|
||||||
echo "Builder dirs ready:"
|
echo "Builder dirs ready:"
|
||||||
echo " artifacts: ${BUILDS}"
|
echo " artifacts: ${BUILDS}"
|
||||||
|
|||||||
@@ -377,7 +377,7 @@ $config['build'] = array_merge([
|
|||||||
'scripts_dir' => '/var/www/ac/workspace/ac-scripts',
|
'scripts_dir' => '/var/www/ac/workspace/ac-scripts',
|
||||||
'notify' => [
|
'notify' => [
|
||||||
'admin_email' => 'bestcastr@gmail.com',
|
'admin_email' => 'bestcastr@gmail.com',
|
||||||
'broadcast_config' => '/var/www/ac/workspace/ac-ms-broadcast/config/config.php',
|
'broadcast_config' => '/var/www/ac/broadcast/config/config.php',
|
||||||
],
|
],
|
||||||
], $config['build'] ?? []);
|
], $config['build'] ?? []);
|
||||||
return $config;
|
return $config;
|
||||||
|
|||||||
Reference in New Issue
Block a user