-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #560 from turbo124/master
Updates for broken build pipeline
- Loading branch information
Showing
1 changed file
with
13 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ ARG BAK_STORAGE_PATH=/var/www/app/docker-backup-storage/ | |
ARG BAK_PUBLIC_PATH=/var/www/app/docker-backup-public/ | ||
|
||
# Get Invoice Ninja and install nodejs packages | ||
FROM --platform=$BUILDPLATFORM node:20-alpine as build | ||
FROM --platform=$BUILDPLATFORM node:lts-alpine as build | ||
|
||
# Download Invoice Ninja | ||
ARG INVOICENINJA_VERSION | ||
|
@@ -29,20 +29,11 @@ RUN cp -r dist/tinymce_6.4.2/* /var/www/app/public/tinymce_6.4.2/ | |
|
||
# Download and extract the latest react application | ||
# | ||
WORKDIR /var/www/app/ | ||
|
||
# Install node packages | ||
ARG BAK_STORAGE_PATH | ||
ARG BAK_PUBLIC_PATH | ||
RUN --mount=target=/var/www/app/node_modules,type=cache \ | ||
npm install \ | ||
&& npm run production \ | ||
&& mv /var/www/app/storage $BAK_STORAGE_PATH \ | ||
&& mv /var/www/app/public $BAK_PUBLIC_PATH | ||
|
||
# Prepare php image | ||
FROM php:${PHP_VERSION}-fpm-alpine as prod | ||
|
||
COPY --from=build / / | ||
|
||
LABEL maintainer="David Bomba <[email protected]>" | ||
|
||
# Adding caching_sha2_password.so | ||
|
@@ -109,6 +100,16 @@ ENV IS_DOCKER true | |
RUN /usr/local/bin/composer install --no-dev --no-scripts --no-interaction | ||
RUN /usr/local/bin/composer dump-autoload --optimize --no-dev --classmap-authoritative --no-scripts --no-interaction | ||
|
||
WORKDIR /var/www/app/ | ||
|
||
# Install node packages | ||
ARG BAK_STORAGE_PATH | ||
ARG BAK_PUBLIC_PATH | ||
RUN npm install | ||
RUN npm run production | ||
RUN mv /var/www/app/storage $BAK_STORAGE_PATH | ||
RUN mv /var/www/app/public $BAK_PUBLIC_PATH | ||
|
||
# Override the environment settings from projects .env file | ||
ENV APP_ENV production | ||
ENV LOG errorlog | ||
|