fix(docker): align www-data UID/GID with host (1000:1000)
All checks were successful
Deploy Max Bot Test / deploy (push) Successful in 38s
All checks were successful
Deploy Max Bot Test / deploy (push) Successful in 38s
php-fpm runs workers as www-data, so master stays root and drops to a UID matching host files. storage bind-mount is writable without runtime chmod hacks. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -26,8 +26,7 @@ jobs:
|
||||
cd /home/pkirillw/dockered-services/max-bot-test && git pull origin main
|
||||
else
|
||||
cd /home/pkirillw/dockered-services && git clone https://git.pkirillw-server.ru/pkirillw/max-bot-test.git
|
||||
fi
|
||||
chmod -R 777 /home/pkirillw/dockered-services/max-bot-test/storage"
|
||||
fi"
|
||||
|
||||
- name: Create .env file
|
||||
env:
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
FROM php:8.4-fpm-alpine AS base
|
||||
|
||||
ARG HOST_UID=1000
|
||||
ARG HOST_GID=1000
|
||||
|
||||
RUN apk add --no-cache \
|
||||
libzip-dev \
|
||||
zlib-dev \
|
||||
unzip \
|
||||
git \
|
||||
curl \
|
||||
shadow \
|
||||
&& docker-php-ext-install zip pcntl \
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
&& groupmod -g $HOST_GID www-data \
|
||||
&& usermod -u $HOST_UID -g $HOST_GID www-data
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
|
||||
Reference in New Issue
Block a user