diff --git a/.github/workflows/build-push-test-docker-image.yml b/.github/workflows/build-push-test-docker-image.yml index 74440c1b6..9f314ad25 100644 --- a/.github/workflows/build-push-test-docker-image.yml +++ b/.github/workflows/build-push-test-docker-image.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v3 - name: Build the app - uses: openconext/build-and-publish-test-container/php72-node14@main + uses: openconext/build-and-publish-test-container/php82-node20@main with: use_yarn: false diff --git a/docker/Dockerfile.test b/docker/Dockerfile.test index fba1f6b9a..a972b3df5 100644 --- a/docker/Dockerfile.test +++ b/docker/Dockerfile.test @@ -1,20 +1,21 @@ -FROM ghcr.io/openconext/openconext-basecontainers/php72-apache2:latest -WORKDIR /var/www/html -ADD output.tar /var/www/html/ +FROM busybox AS unpack +WORKDIR /unpack +COPY output.zip /unpack +RUN unzip /unpack/output.zip +FROM ghcr.io/openconext/openconext-basecontainers/php82-apache2:latest +# Set the default workdir +WORKDIR /var/www/html +COPY --from=unpack /unpack/ /var/www/html/ # Add the application configuration files -COPY config/legacy/parameters.yaml.dist config/legacy/parameters.yaml -COPY config/packages/prod/monolog.yaml.docker config/packages/prod/monolog.yaml +COPY config/openconext/parameters.yaml.dist config/openconext/parameters.yaml # Add the config files for Apache2 RUN rm -rf /etc/apache2/sites-enabled/* -COPY ./docker/conf/middleware-test-apache2.conf /etc/apache2/sites-enabled/middleware.conf - -# Recreate the cache directory and set the correct permissions -RUN rm -rf /var/www/html/var/cache/prod && \ - mkdir -p /var/www/html/var/cache/prod && \ +COPY ./docker/conf/apache2.conf /etc/apache2/sites-enabled/apache2.conf +RUN rm -rf /var/www/html/var/cache/prod &&\ + mkdir -p /var/www/html/var/cache &&\ chown -R www-data /var/www/html/var EXPOSE 80 - CMD ["apache2-foreground"]