Skip to content

Commit

Permalink
adjust docker files according to new insights
Browse files Browse the repository at this point in the history
  • Loading branch information
ulfgebhardt committed Feb 27, 2024
1 parent 8ade071 commit 47672bf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 25 deletions.
35 changes: 18 additions & 17 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,57 @@
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
- frontend_node_modules:/app/node_modules
# 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
- storybook_node_modules:/app/node_modules
# 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
Expand Down
13 changes: 5 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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:
Expand Down

0 comments on commit 47672bf

Please sign in to comment.