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
|
cd /home/pkirillw/dockered-services/max-bot-test && git pull origin main
|
||||||
else
|
else
|
||||||
cd /home/pkirillw/dockered-services && git clone https://git.pkirillw-server.ru/pkirillw/max-bot-test.git
|
cd /home/pkirillw/dockered-services && git clone https://git.pkirillw-server.ru/pkirillw/max-bot-test.git
|
||||||
fi
|
fi"
|
||||||
chmod -R 777 /home/pkirillw/dockered-services/max-bot-test/storage"
|
|
||||||
|
|
||||||
- name: Create .env file
|
- name: Create .env file
|
||||||
env:
|
env:
|
||||||
|
|||||||
@@ -1,13 +1,19 @@
|
|||||||
FROM php:8.4-fpm-alpine AS base
|
FROM php:8.4-fpm-alpine AS base
|
||||||
|
|
||||||
|
ARG HOST_UID=1000
|
||||||
|
ARG HOST_GID=1000
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
libzip-dev \
|
libzip-dev \
|
||||||
zlib-dev \
|
zlib-dev \
|
||||||
unzip \
|
unzip \
|
||||||
git \
|
git \
|
||||||
curl \
|
curl \
|
||||||
|
shadow \
|
||||||
&& docker-php-ext-install zip pcntl \
|
&& 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
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user