1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-22 07:42:41 +00:00

fix hadolint?

This commit is contained in:
Christian Winther 2024-03-06 21:33:07 +00:00
parent ad309ef523
commit 9d9a4cbe20

View file

@ -196,16 +196,16 @@ ENV NODE_ENV=$NODE_ENV
WORKDIR /var/www/
SHELL [ "bash", "-c" ]
# Install NPM dependencies
RUN --mount=type=cache,id=pixelfed-node-${BUILDARCH},sharing=locked,target=/tmp/cache \
--mount=type=bind,source=package.json,target=/var/www/package.json \
--mount=type=bind,source=package-lock.json,target=/var/www/package-lock.json \
<<EOF bash
if [[ $BUILD_FRONTEND -eq 1 ]]; then
npm install \
--cache /tmp/cache \
--no-save \
--dev
<<EOF
if [[ $BUILD_FRONTEND -eq 1 ]];
then
npm install --cache /tmp/cache --no-save --dev
else
echo "Skipping [npm install] as --build-arg [BUILD_FRONTEND] is not set to '1'"
fi
@ -215,8 +215,10 @@ EOF
COPY --chown=${RUNTIME_UID}:${RUNTIME_GID} . /var/www
# Build the frontend with "mix" (See package.json)
RUN <<EOF bash
if [[ $BUILD_FRONTEND -eq 1 ]]; then
RUN \
<<EOF
if [[ $BUILD_FRONTEND -eq 1 ]];
then
npm run production
else
echo "Skipping [npm run production] as --build-arg [BUILD_FRONTEND] is not set to '1'"