From 47672bf28fabc373fd4b014117b204ed3733d8ac Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Tue, 27 Feb 2024 11:50:49 +0100 Subject: [PATCH] adjust docker files according to new insights --- docker-compose.override.yml | 35 ++++++++++++++++++----------------- docker-compose.yml | 13 +++++-------- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 4f3c1ec..4b2dde8 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -1,16 +1,19 @@ version: '3.4' + services: - # ###################################################### - # FRONTEND ############################################# - # ###################################################### + ####################################################### + # FRONTEND ############################################ + ####################################################### frontend: # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there image: it4c/frontend:local-development build: target: development + ports: + # development server port + - 24678:24678 environment: - - NODE_ENV="development" - # - DEBUG=true + - NODE_ENV=development 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 @@ -18,19 +21,18 @@ services: # bind the local folder to the docker to allow live reload - ./:/app - # ###################################################### - # STORYBOOK ############################################ - # ###################################################### + ####################################################### + # STORYBOOK ########################################### + ####################################################### storybook: # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there image: it4c/frontend:local-storybook build: target: storybook - environment: - - NODE_ENV="development" - # - DEBUG=true ports: - 6006:6006 + environment: + - NODE_ENV=development 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 @@ -38,19 +40,18 @@ services: # bind the local folder to the docker to allow live reload - ./:/app - # ###################################################### - # DOCUMENTATION ######################################## - # ###################################################### + ####################################################### + # DOCUMENTATION ####################################### + ####################################################### documentation: # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there image: it4c/frontend:local-documentation build: target: documentation - environment: - - NODE_ENV="development" - # - DEBUG=true ports: - 8080:8080 + environment: + - NODE_ENV=development 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 diff --git a/docker-compose.yml b/docker-compose.yml index dbc715b..a084ff0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,9 @@ -# This file defines the production settings. It is overwritten by docker-compose.override.yml, -# which defines the development settings. The override.yml is loaded by default. Therefore it -# is required to explicitly define if you want an production build: -# > docker-compose -f docker-compose.yml up version: '3.4' + services: + ####################################################### + # FRONTEND ############################################ + ####################################################### frontend: # name the image so that it cannot be found in a DockerHub repository, otherwise it will not be built locally from the 'dockerfile' but pulled from there image: it4c/frontend:local-production @@ -22,10 +22,7 @@ services: # - BUILD_DATE="1970-01-01T00:00:00.00Z" # - BUILD_VERSION="0.0.0.0" # - BUILD_COMMIT="0000000" - - NODE_ENV="production" - # env_file: - # - ./.env - # - ./frontend/.env + - NODE_ENV=production networks: external-net: