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

docker: remove special handling of instance-config.php from build

This commit is contained in:
Zankaria 2024-04-16 21:03:47 +02:00
parent bf4f388a04
commit 024f955338

View File

@ -71,20 +71,16 @@ RUN rmdir /var/www/html \
&& install -d -m 700 -o www-data -g www-data /var/cache/gen-cache \ && install -d -m 700 -o www-data -g www-data /var/cache/gen-cache \
&& install -d -m 700 -o www-data -g www-data /var/cache/template-cache && install -d -m 700 -o www-data -g www-data /var/cache/template-cache
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
# Copy the bootstrap script. # Copy the bootstrap script.
COPY ./docker/php/bootstrap.sh /usr/local/bin/bootstrap.sh COPY ./docker/php/bootstrap.sh /usr/local/bin/bootstrap.sh
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
# Copy the actual project (use .dockerignore to exclude stuff). # Copy the actual project (use .dockerignore to exclude stuff).
COPY . /code COPY . /code
# Make the instance configuration owned by www-data.
# Make it writable by php.
# Install the compose depedencies. # Install the compose depedencies.
RUN chown www-data /code/inc/instance-config.php && chgrp www-data /code/inc/instance-config.php \ RUN cd /code && composer install
&& chmod 660 /code/inc/instance-config.php \
&& cd /code && composer install
WORKDIR "/var/www" WORKDIR "/var/www"
CMD [ "bootstrap.sh" ] CMD [ "bootstrap.sh" ]