diff --git a/backend/Dockerfile b/backend/Dockerfile index bc8cd38ce..dd151ae88 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -76,6 +76,9 @@ RUN cd ../database && yarn install --production=false --frozen-lockfile --non-in # yarn build RUN yarn run build +# yarn build database +RUN cd ../database && yarn run build + ################################################################################## # TEST ########################################################################### ################################################################################## diff --git a/database/Dockerfile b/database/Dockerfile index 1b30e9c0c..fe3d5ab9f 100644 --- a/database/Dockerfile +++ b/database/Dockerfile @@ -73,7 +73,7 @@ RUN yarn run build FROM build as test_up # Run command -CMD /bin/sh -c "yarn run dev_up" +CMD /bin/sh -c "yarn install && yarn run dev_up" ################################################################################## # TEST RESET ##################################################################### @@ -81,7 +81,7 @@ CMD /bin/sh -c "yarn run dev_up" FROM build as test_reset # Run command -CMD /bin/sh -c "yarn run dev_reset" +CMD /bin/sh -c "yarn install && yarn run dev_reset" ################################################################################## # TEST DOWN ###################################################################### @@ -89,7 +89,7 @@ CMD /bin/sh -c "yarn run dev_reset" FROM build as test_down # Run command -CMD /bin/sh -c "yarn run dev_down" +CMD /bin/sh -c "yarn install && yarn run dev_down" ################################################################################## # PRODUCTION (Does contain only "binary"- and static-files to reduce image size) # diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 0fc8ff893..1fa6c7e23 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -37,6 +37,7 @@ services: # Therefore it is possible to have a different node version on the host machine - backend_node_modules:/app/node_modules - backend_database_node_modules:/database/node_modules + - backend_database_build:/database/build # bind the local folder to the docker to allow live reload - ./backend:/app - ./database:/database @@ -155,6 +156,7 @@ volumes: frontend_node_modules: backend_node_modules: backend_database_node_modules: + backend_database_build: database_node_modules: database_build: login_build_ubuntu_3.1: \ No newline at end of file