1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-28 01:10:51 +01:00

docker: change the work directory to /var/www

This commit is contained in:
Zankaria 2024-03-31 15:41:02 +02:00
parent 482962844a
commit d55961995c
3 changed files with 16 additions and 17 deletions

View File

@ -2,7 +2,7 @@
set -eu set -eu
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol install -m 775 -o leftypol -g leftypol -d /var/www
ln -s \ ln -s \
/code/banners/ \ /code/banners/ \
/code/static/ \ /code/static/ \
@ -14,18 +14,18 @@ ln -s \
/code/LICENSE.* \ /code/LICENSE.* \
/code/robots.txt \ /code/robots.txt \
/code/install.sql \ /code/install.sql \
/var/www-leftypol/ /var/www/
install -m 775 -o leftypol -g leftypol -d /var/tmp/leftypol 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 leftypol -g leftypol -d /var/tmp/leftypol/cache
ln -s /var/tmp/leftypol /var/www-leftypol/tmp ln -s /var/tmp/leftypol /var/www/tmp
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol/js install -m 775 -o leftypol -g leftypol -d /var/www/js
ln -s /code/js/* /var/www-leftypol/js/ ln -s /code/js/* /var/www/js/
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol/templates install -m 775 -o leftypol -g leftypol -d /var/www/templates
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol/templates/cache install -m 775 -o leftypol -g leftypol -d /var/www/templates/cache
ln -s /code/templates/* /var/www-leftypol/templates/ ln -s /code/templates/* /var/www/templates/
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol/inc install -m 775 -o leftypol -g leftypol -d /var/www/inc
ln -s /code/inc/* /var/www-leftypol/inc/ ln -s /code/inc/* /var/www/inc/

View File

@ -6,7 +6,7 @@ server {
listen 80 default_server; listen 80 default_server;
listen [::]:80 default_server ipv6only=on; listen [::]:80 default_server ipv6only=on;
server_name leftypol; server_name leftypol;
root /var/www-leftypol; root /var/www;
add_header X-Frame-Options "SAMEORIGIN"; add_header X-Frame-Options "SAMEORIGIN";
add_header X-Content-Type-Options "nosniff"; add_header X-Content-Type-Options "nosniff";
@ -56,7 +56,7 @@ server {
proxy_set_header Forwarded-Request-Id $x_request_id; proxy_set_header Forwarded-Request-Id $x_request_id;
fastcgi_pass php-upstream; fastcgi_pass php-upstream;
fastcgi_index index.php; fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name;
fastcgi_read_timeout 600; fastcgi_read_timeout 600;
include fastcgi_params; include fastcgi_params;
} }

View File

@ -40,11 +40,10 @@ COPY --from=composer /usr/bin/composer /usr/bin/composer
COPY . /code COPY . /code
RUN /code/docker/common-setup.sh \ RUN /code/docker/common-setup.sh \
&& ln -s /code/composer.json /code/composer.lock /var/www-leftypol/ \ && ln -s /code/composer.json /code/composer.lock /var/www/ \
&& cd /var/www-leftypol && composer install && cd /var/www && composer install
# RUN /code/docker/common-setup.sh php
RUN /code/docker/common-setup.sh WORKDIR "/var/www"
WORKDIR "/var/www-leftypol"
CMD ["php-fpm"] CMD ["php-fpm"]
EXPOSE 9000 EXPOSE 9000