mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-14 19:07:39 +01:00
docker: change user to www-data
This commit is contained in:
parent
d55961995c
commit
7979404c1b
@ -2,7 +2,7 @@
|
||||
|
||||
set -eu
|
||||
|
||||
install -m 775 -o leftypol -g leftypol -d /var/www
|
||||
install -m 775 -o www-data -g www-data -d /var/www
|
||||
ln -s \
|
||||
/code/banners/ \
|
||||
/code/static/ \
|
||||
@ -16,16 +16,16 @@ ln -s \
|
||||
/code/install.sql \
|
||||
/var/www/
|
||||
|
||||
install -m 775 -o leftypol -g leftypol -d /var/tmp/leftypol
|
||||
install -m 775 -o leftypol -g leftypol -d /var/tmp/leftypol/cache
|
||||
install -m 775 -o www-data -g www-data -d /var/tmp/leftypol
|
||||
install -m 775 -o www-data -g www-data -d /var/tmp/leftypol/cache
|
||||
ln -s /var/tmp/leftypol /var/www/tmp
|
||||
|
||||
install -m 775 -o leftypol -g leftypol -d /var/www/js
|
||||
install -m 775 -o www-data -g www-data -d /var/www/js
|
||||
ln -s /code/js/* /var/www/js/
|
||||
|
||||
install -m 775 -o leftypol -g leftypol -d /var/www/templates
|
||||
install -m 775 -o leftypol -g leftypol -d /var/www/templates/cache
|
||||
install -m 775 -o www-data -g www-data -d /var/www/templates
|
||||
install -m 775 -o www-data -g www-data -d /var/www/templates/cache
|
||||
ln -s /code/templates/* /var/www/templates/
|
||||
|
||||
install -m 775 -o leftypol -g leftypol -d /var/www/inc
|
||||
install -m 775 -o www-data -g www-data -d /var/www/inc
|
||||
ln -s /code/inc/* /var/www/inc/
|
||||
|
@ -1,11 +1,10 @@
|
||||
FROM nginx:1.25.3-alpine
|
||||
|
||||
COPY . /code
|
||||
RUN addgroup --system leftypol \
|
||||
&& adduser --system leftypol \
|
||||
&& adduser leftypol leftypol \
|
||||
&& /code/docker/common-setup.sh
|
||||
RUN adduser --system www-data \
|
||||
&& adduser www-data www-data \
|
||||
&& /code/docker/common-setup.sh
|
||||
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
EXPOSE 80 443
|
||||
CMD [ "nginx", "-g", "daemon off;" ]
|
||||
EXPOSE 80
|
||||
|
@ -1,14 +1,16 @@
|
||||
# This and proxy.conf are based on
|
||||
# https://github.com/dead-guru/devichan/blob/master/nginx/nginx.conf
|
||||
|
||||
user leftypol;
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
|
||||
error_log /dev/stdout warn;
|
||||
pid /var/run/nginx.pid;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
@ -33,8 +33,7 @@ RUN apt-get update && apt-get upgrade -y && apt-get install -y \
|
||||
&& pecl install imagick \
|
||||
&& pecl install -o -f igbinary \
|
||||
&& docker-php-ext-install gd zip opcache intl pdo pdo_mysql mysqli bcmath gettext iconv mbstring curl \
|
||||
&& docker-php-ext-enable igbinary redis imagick \
|
||||
&& useradd -MU leftypol
|
||||
&& docker-php-ext-enable igbinary redis imagick
|
||||
|
||||
COPY --from=composer /usr/bin/composer /usr/bin/composer
|
||||
COPY . /code
|
||||
@ -43,7 +42,6 @@ RUN /code/docker/common-setup.sh \
|
||||
&& ln -s /code/composer.json /code/composer.lock /var/www/ \
|
||||
&& cd /var/www && composer install
|
||||
|
||||
# RUN /code/docker/common-setup.sh php
|
||||
WORKDIR "/var/www"
|
||||
CMD ["php-fpm"]
|
||||
CMD [ "php-fpm" ]
|
||||
EXPOSE 9000
|
||||
|
@ -1,6 +1,6 @@
|
||||
[www]
|
||||
user = leftypol
|
||||
group = leftypol
|
||||
user = www-data
|
||||
group = www-data
|
||||
listen = 127.0.0.1:9000
|
||||
pm = static
|
||||
pm.max_children = 16
|
||||
|
Loading…
Reference in New Issue
Block a user