Skip to content

Commit

Permalink
improve docker compose config for frontend e2e testing
Browse files Browse the repository at this point in the history
  • Loading branch information
mahula committed May 6, 2024
1 parent 79eeddd commit 19a452d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
7 changes: 2 additions & 5 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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) #
Expand Down
8 changes: 1 addition & 7 deletions frontend/docker-compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

0 comments on commit 19a452d

Please sign in to comment.