- fixed node_modules running out of sync since they are on a volume for development docker builds

This commit is contained in:
Ulf Gebhardt 2021-01-20 13:43:22 +01:00
parent a2fb94a7de
commit c41d32d527
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
2 changed files with 8 additions and 4 deletions

View File

@ -52,7 +52,9 @@ FROM base as development
# local filesystem which will need a rebuild anyway
# Run command
CMD ["yarn", "run", "dev"]
# (for development we need to execute yarn install since the
# node_modules are on another volume and need updating)
CMD /bin/sh -c "yarn install && yarn run dev"
##################################################################################
# BUILD (Does contain all files and is therefore bloated) ########################
@ -81,4 +83,4 @@ COPY --from=build ${DOCKER_WORKDIR}/public/providers.json ./public/providers.jso
RUN yarn install --production=true --frozen-lockfile --non-interactive --no-cache
# Run command
CMD ["yarn", "run", "start"]
CMD /bin/sh -c "yarn run start"

View File

@ -52,7 +52,9 @@ FROM base as development
# local filesystem which will need a rebuild anyway
# Run command
CMD ["yarn", "run", "dev"]
# (for development we need to execute yarn install since the
# node_modules are on another volume and need updating)
CMD /bin/sh -c "yarn install && yarn run dev"
##################################################################################
# BUILD (Does contain all files and is therefore bloated) ########################
@ -83,6 +85,6 @@ COPY --from=build ${DOCKER_WORKDIR}/locales ./locales
RUN yarn install --production=true --frozen-lockfile --non-interactive --no-cache
# Run command
CMD ["yarn", "run", "start"]
CMD /bin/sh -c "yarn run start"