Skip to content

Instantly share code, notes, and snippets.

@iqfareez
Created July 28, 2026 01:23
Show Gist options
  • Select an option

  • Save iqfareez/0cf0e9ad0a7224333ec78ba2c12c6709 to your computer and use it in GitHub Desktop.

Select an option

Save iqfareez/0cf0e9ad0a7224333ec78ba2c12c6709 to your computer and use it in GitHub Desktop.
Vscode bug #327633
FROM node:24-alpine AS frontend
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY resources/ ./resources/
COPY vite.config.js ./
COPY tailwind.config.js ./
COPY postcss.config.js ./
COPY resources ./resources
COPY public ./public
# Build frontend assets
RUN npm run build
FROM serversideup/php:8.4-cli-alpine AS vendor
WORKDIR /app
COPY composer.json composer.lock ./
USER root
RUN install-php-extensions intl
RUN composer install --no-dev --no-interaction --optimize-autoloader --prefer-dist
FROM serversideup/php:8.4-fpm-nginx-alpine AS final
USER root
# Install php extensions: https://serversideup.net/open-source/docker-php/docs/customizing-the-image/installing-additional-php-extensions
RUN install-php-extensions intl
WORKDIR /var/www/html
COPY --chown=www-data:www-data . .
COPY --from=vendor --chown=www-data:www-data /app/vendor ./vendor
COPY --from=frontend --chown=www-data:www-data /app/public/build ./public/build
# Add custom script: https://serversideup.net/open-source/docker-php/docs/customizing-the-image/adding-your-own-start-up-scripts
COPY --chmod=755 .docker/entrypoint.d/ /etc/entrypoint.d/
# Set permissions for runtime folders
RUN chown -R www-data:www-data storage bootstrap/cache && \
chmod -R 775 storage bootstrap/cache
USER www-data
ARG APP_COMMITSHA=local
ARG APP_REFNAME=local
ARG APP_RELEASETAG=
ARG APP_REPOSITORYURL=
ENV APP_COMMITSHA=$APP_COMMITSHA \
APP_REFNAME=$APP_REFNAME \
APP_RELEASETAG=$APP_RELEASETAG \
APP_REPOSITORYURL=$APP_REPOSITORYURL
FROM serversideup/php:8.4-cli-alpine AS vendor
WORKDIR /app
COPY composer.json composer.lock ./
USER root
RUN install-php-extensions intl
RUN composer install --no-dev --no-interaction --optimize-autoloader --prefer-dist
FROM node:24-alpine AS frontend
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY --from=vendor /app/vendor ./vendor
COPY app/Filament ./app/Filament
COPY resources ./resources
COPY vite.config.js ./
RUN npm run build
FROM serversideup/php:8.4-fpm-nginx-alpine AS final
USER root
# Install php extensions: https://serversideup.net/open-source/docker-php/docs/customizing-the-image/installing-additional-php-extensions
RUN install-php-extensions intl
WORKDIR /var/www/html
COPY --chown=www-data:www-data . .
COPY --from=vendor --chown=www-data:www-data /app/vendor ./vendor
COPY --from=frontend --chown=www-data:www-data /app/public/build ./public/build
# Add custom script: https://serversideup.net/open-source/docker-php/docs/customizing-the-image/adding-your-own-start-up-scripts
COPY --chmod=755 .docker/entrypoint.d/ /etc/entrypoint.d/
# Set permissions for runtime folders
RUN chown -R www-data:www-data storage bootstrap/cache && \
chmod -R 775 storage bootstrap/cache
USER www-data
ARG APP_COMMITSHA=local
ARG APP_REFNAME=local
ARG APP_RELEASETAG=
ARG APP_REPOSITORYURL=
ENV APP_COMMITSHA=$APP_COMMITSHA \
APP_REFNAME=$APP_REFNAME \
APP_RELEASETAG=$APP_RELEASETAG \
APP_REPOSITORYURL=$APP_REPOSITORYURL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment