FROM webdevops/php-nginx:8.3-alpine ENV WEB_DOCUMENT_ROOT=/app ARG CACHE_BUST=1774403239 COPY . /app RUN echo "index index.php index.html index.htm;" > /opt/docker/etc/nginx/vhost.common.d/01-index.conf \ && echo "add_header Cache-Control 'no-cache, no-store, must-revalidate';" > /opt/docker/etc/nginx/vhost.common.d/02-no-cache.conf RUN set -e; if [ -f /app/composer.json ]; then \ echo ">>> composer.json found, installing dependencies..."; \ curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer; \ cd /app && composer install --no-dev --no-interaction --optimize-autoloader; \ ls -la /app/vendor/autoload.php; \ else \ echo ">>> No composer.json found, skipping composer install"; \ fi RUN set -e; if [ -f /app/package.json ]; then \ echo ">>> package.json found, installing node dependencies..."; \ apk add --no-cache nodejs npm; \ cd /app && npm install --production; \ else \ echo ">>> No package.json found, skipping npm install"; \ fi COPY --chmod=755 .docker/99-migrate.sh /opt/docker/provision/entrypoint.d/99-migrate.sh RUN chown -R application:application /app