1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-04-12 16:28:06 +00:00

Move volume so we can still build on ubuntu.

This commit is contained in:
Nigel Gott 2021-05-05 15:37:24 +01:00
parent d06069e021
commit dc69260002
2 changed files with 3 additions and 12 deletions

View file

@ -32,7 +32,6 @@ ADD --chown=$UID:$GID ./web-frontend/package.json ./web-frontend/yarn.lock /base
WORKDIR /baserow/web-frontend
VOLUME ["/baserow/web-frontend/node_modules"]
RUN yarn install
@ -42,6 +41,8 @@ ADD --chown=$UID:$GID ./premium/web-frontend /baserow/web-frontend/plugins/premi
RUN dos2unix /baserow/web-frontend/docker/docker-entrypoint.sh && \
chmod a+x /baserow/web-frontend/docker/docker-entrypoint.sh
# Ensure we don't overwrite the built node_modules with an empty mount from a fresh checkout.
VOLUME ["/baserow/web-frontend/node_modules"]
# Ensure we don't pollute the devs actual repo when mounting in files by
# putting the plugins into an anonymous docker volumes.
VOLUME ["/baserow/web-frontend/plugins"]

View file

@ -18,16 +18,6 @@ help : Show this message
"""
}
# If the image is running with a volume mounted into /baserow/web-frontend/ it will overwrite
# the images node_modules folder. If the user has mounted in a folder without their own
# node_modules we will copy in the preinstalled image modules for them. This happens on a
# clean first checkout and run of a dev environment.
if [ -d "/baserow/web-frontend-modules/" ] && [ ! -d "/baserow/web-frontend/node_modules/" ]; then
echo "Setting up preinstalled yarn modules from image into web-frontend/node_modules"
mv /baserow/web-frontend-modules/ /baserow/web-frontend/node_modules/
fi
case "$1" in
dev)
CMD="yarn run dev"
@ -55,4 +45,4 @@ case "$1" in
show_help
exit 1
;;
esac
esac