adjust docker files according to new insights

This commit is contained in:
Ulf Gebhardt 2024-02-27 11:50:49 +01:00
parent 8ade071ab7
commit 47672bf28f
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
2 changed files with 23 additions and 25 deletions

View File

@ -1,16 +1,19 @@
version: '3.4' version: '3.4'
services: services:
####################################################### #######################################################
# FRONTEND ############################################# # 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 # 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 image: it4c/frontend:local-development
build: build:
target: development target: development
ports:
# development server port
- 24678:24678
environment: environment:
- NODE_ENV="development" - NODE_ENV=development
# - DEBUG=true
volumes: volumes:
# This makes sure the docker container has its own node modules. # 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 # Therefore it is possible to have a different node version on the host machine
@ -19,18 +22,17 @@ services:
- ./:/app - ./:/app
####################################################### #######################################################
# STORYBOOK ############################################ # 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 # 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 image: it4c/frontend:local-storybook
build: build:
target: storybook target: storybook
environment:
- NODE_ENV="development"
# - DEBUG=true
ports: ports:
- 6006:6006 - 6006:6006
environment:
- NODE_ENV=development
volumes: volumes:
# This makes sure the docker container has its own node modules. # 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 # Therefore it is possible to have a different node version on the host machine
@ -39,18 +41,17 @@ services:
- ./:/app - ./:/app
####################################################### #######################################################
# DOCUMENTATION ######################################## # 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 # 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 image: it4c/frontend:local-documentation
build: build:
target: documentation target: documentation
environment:
- NODE_ENV="development"
# - DEBUG=true
ports: ports:
- 8080:8080 - 8080:8080
environment:
- NODE_ENV=development
volumes: volumes:
# This makes sure the docker container has its own node modules. # 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 # Therefore it is possible to have a different node version on the host machine

View File

@ -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' version: '3.4'
services: 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 # 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 image: it4c/frontend:local-production
@ -22,10 +22,7 @@ services:
# - BUILD_DATE="1970-01-01T00:00:00.00Z" # - BUILD_DATE="1970-01-01T00:00:00.00Z"
# - BUILD_VERSION="0.0.0.0" # - BUILD_VERSION="0.0.0.0"
# - BUILD_COMMIT="0000000" # - BUILD_COMMIT="0000000"
- NODE_ENV="production" - NODE_ENV=production
# env_file:
# - ./.env
# - ./frontend/.env
networks: networks:
external-net: external-net: