diff --git a/.gitignore b/.gitignore index c435d5e5..802ae9c5 100755 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,6 @@ symfony copy.lock .composer .cache .php-cs-fixer.dist.php + + +test.yml \ No newline at end of file diff --git a/docker/dockerfileGHA.prod/Dockerfile b/docker/dockerfileGHA.prod/Dockerfile index 80cab238..46518bf5 100755 --- a/docker/dockerfileGHA.prod/Dockerfile +++ b/docker/dockerfileGHA.prod/Dockerfile @@ -2,15 +2,11 @@ FROM php:8.2-apache-bookworm AS base -# Create a non-root user and group -RUN addgroup --system nonroot \ - && adduser --system --ingroup nonroot nonroot - # Set the working directory inside the container WORKDIR /var/www # Copy custom php.ini configuration into the container -COPY ./docker/dockerfileGHA.dev/php.ini /usr/local/etc/php/php.ini +COPY ./docker/dockerfileGHA.prod/php.ini /usr/local/etc/php/php.ini # Configure system settings and install necessary packages and extensions RUN \ @@ -101,25 +97,25 @@ RUN \ # Move Symfony CLI to a global location && mv /root/.symfony5/bin/symfony /usr/local/bin/symfony \ # Change /var/www ownership - && chown -R nonroot:nonroot /var/www + && chown -R www-data:www-data /var/www # Switch to non-root user -USER nonroot +USER www-data # Building stage FROM base AS building # Switch to non-root user -USER nonroot +USER www-data RUN mkdir -p /var/www/building \ - && chown -R nonroot:nonroot /var/www/building + && chown -R www-data:www-data /var/www/building # Set working directory WORKDIR /var/www/building # Copy application code with correct ownership -COPY --chown=nonroot:nonroot --chmod=755 . /var/www/building +COPY --chown=www-data:www-data --chmod=755 . /var/www/building # Install dependencies and perform build steps RUN cp .env.test .env \ @@ -134,4 +130,4 @@ RUN cp .env.test .env \ WORKDIR /var/www -CMD [ "exec apache2-foreground" ] \ No newline at end of file +CMD [ "apache2-foreground" ] \ No newline at end of file