From 19a452d1ade12ffe8354e587f795c531a9c0155c Mon Sep 17 00:00:00 2001 From: mahula Date: Mon, 6 May 2024 14:14:20 +0200 Subject: [PATCH] improve docker compose config for frontend e2e testing --- frontend/Dockerfile | 7 ++----- frontend/docker-compose.test.yml | 8 +------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index dae836bb6d..2eed3a5053 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -93,13 +93,10 @@ RUN npm run build ################################################################################## # TEST ########################################################################### ################################################################################## -#FROM build as test - -# Install Additional Software -# RUN apk add --no-cache bash jq +FROM build as test # Run command -#CMD /bin/sh -c "yarn run dev" +CMD /bin/sh -c "npm run server:prod" ################################################################################## # PRODUCTION (Does contain only "binary"- and static-files to reduce image size) # diff --git a/frontend/docker-compose.test.yml b/frontend/docker-compose.test.yml index 10c3f88a4e..745a9ab370 100644 --- a/frontend/docker-compose.test.yml +++ b/frontend/docker-compose.test.yml @@ -7,15 +7,9 @@ services: frontend: image: it4c/frontend:local-test build: - target: production + target: test environment: - NODE_ENV=production - volumes: - # This makes sure the docker container has its own node modules. - # Therefore it is possible to have a different node version on the host machine - - frontend_node_modules:/app/node_modules - # bind the local folder to the docker to allow live reload - - ./:/app volumes: frontend_node_modules: