From 9c9d89609382e9a9f718ae763c575c9d547fe21c Mon Sep 17 00:00:00 2001 From: langerae Date: Thu, 8 Feb 2024 11:04:43 +0100 Subject: [PATCH] Added readme on building and pushing Docker image --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.md b/README.md index a4b3935..642332f 100644 --- a/README.md +++ b/README.md @@ -37,3 +37,37 @@ See [Configuration Reference](https://cli.vuejs.org/config/). ### Environment Before deploy please adapt the .env file or generate corresponding environment variables as in the .env.example file. + +### Deployment + +To deploy the front-end to Google Cloud follow these steps: + +* Create the Docker image using the Dockerfile +* Push the Docker image to Harbor container registry +* Run the Terraform templates to deploy your Docker container + +To build the container image locally run the docker build command. After completion you can run a Docker container locally using for example Docker Desktop + +``` +docker build -t . +``` + +To make the Docker image available to run containers on external compute services you need to store the image somewhere. This can be done on the Harbor docker registry. First login to the Harbor docker registry using docker login: + +``` +docker login -u <> -p <> https://containers.deltares.nl +``` + +After that tag the container image using the docker tag command: + +``` +docker tag <> https://containers.deltares.nl/<>/<>:<> +``` + +And push your Docker image to the Docker registry using the docker push command: + +``` +docker push https://containers.deltares.nl/<>/<>:<> +``` + +If you do not yet have a project in Harbor please request a project via DSC Support: https://publicwiki.deltares.nl/display/GIT/Harbor