From c1c38c1e2ae002e8d5cc794341d1046bc7087c4c Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Thu, 18 Apr 2024 11:34:30 +0200 Subject: [PATCH] admin docker --- README.md | 5 ++- docker-compose.override.yml | 66 ++++++++++++++++++++++++++++++++++++- docker-compose.yml | 17 ++++++++++ 3 files changed, 86 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3bf64a5fbb..567363be38 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,12 @@ The following endpoints are provided if `docker compose` is used: | [http://localhost:3001](http://localhost:3001) | Frontend | | [http://localhost:8082](http://localhost:8082) | Frontend Documentation | | [http://localhost:6007](http://localhost:6007) | Frontend Storybook | +| [http://localhost:3002](http://localhost:3002) | Admin | +| [http://localhost:8083](http://localhost:8083) | Admin Documentation | +| [http://localhost:6008](http://localhost:6008) | Admin Storybook | | [http://localhost:4000/graphql](http://localhost:4000/graphql) | Backend GraphQL API | | [http://localhost:4000/playground](http://localhost:4000/playground) | Backend GraphQL Playground | -| [http://localhost:8083](http://localhost:8083) | Backend Documentation | +| [http://localhost:8084](http://localhost:8084) | Backend Documentation | | [http://localhost:8080](http://localhost:8080) | Documentation | ## How to release diff --git a/docker-compose.override.yml b/docker-compose.override.yml index c5542f555f..cd6095296b 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -130,6 +130,67 @@ services: # bind the local folder to the docker to allow live reload - ./frontend:/app + ######################################################## + # ADMIN ################################################ + ######################################################## + admin: + # 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: dreammall/admin:local-development + build: + target: development + ports: + # development server port + - 24680:24680 + environment: + - NODE_ENV=development + - PORT_HMR=24680 + 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 + #- admin_node_modules:/app/node_modules + # bind the local folder to the docker to allow live reload + - ./admin:/app + + ####################################################### + # ADMIN STORYBOOK ##################################### + ####################################################### + admin-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: dreammall/admin:local-storybook + build: + context: ./admin + target: storybook + ports: + - 6008: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 + #- admin_storybook_node_modules:/app/node_modules + # bind the local folder to the docker to allow live reload + - ./admin:/app + + ####################################################### + # ADMIN DOCUMENTATION ################################# + ####################################################### + admin-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: dreammall/admin:local-documentation + build: + context: ./admin + target: documentation + ports: + - 8083: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 + #- admin_documentation_node_modules:/app/node_modules + # bind the local folder to the docker to allow live reload + - ./admin:/app + ####################################################### # BACKEND ############################################# ####################################################### @@ -158,7 +219,7 @@ services: context: ./backend target: documentation ports: - - 8083:8080 + - 8084:8080 environment: - NODE_ENV=development volumes: @@ -194,6 +255,9 @@ volumes: frontend_node_modules: frontend_storybook_node_modules: frontend_documentation_node_modules: + admin_node_modules: + admin_storybook_node_modules: + admin_documentation_node_modules: backend_node_modules: backend_documentation_node_modules: documentation_node_modules: \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 8bf23c3342..f2669e8139 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,6 +54,23 @@ services: environment: - NODE_ENV=production + ######################################################## + # ADMIN ################################################ + ######################################################## + admin: + # 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: dreammall/admin:local-production + build: + context: ./admin + target: production + networks: + - external-net + - internal-net + ports: + - 3002:3000 + environment: + - NODE_ENV=production + ####################################################### # BACKEND ############################################# #######################################################