Skip to content

Commit

Permalink
admin docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ulfgebhardt committed Apr 18, 2024
1 parent 30fb59e commit c1c38c1
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
66 changes: 65 additions & 1 deletion docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 #############################################
#######################################################
Expand Down Expand Up @@ -158,7 +219,7 @@ services:
context: ./backend
target: documentation
ports:
- 8083:8080
- 8084:8080
environment:
- NODE_ENV=development
volumes:
Expand Down Expand Up @@ -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:
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 #############################################
#######################################################
Expand Down

0 comments on commit c1c38c1

Please sign in to comment.