Skip to content

Commit

Permalink
chore: Update the Artifact Registry docker image path
Browse files Browse the repository at this point in the history
  • Loading branch information
cybersokari committed May 3, 2024
1 parent be2acae commit 5411cf5
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
3 changes: 2 additions & 1 deletion HANDY_COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ $ gcloud compute ssh [vm-name]

Pull docker image from Artifact Registry
```shell
$ docker pull gcr.io/[project-id]/[image-name]
$ docker pull [host-name]/[project-id]/[repository]/[image-name]
```

Run a container on your machine
```shell
$ docker run -ti --rm -p 8080:80 gcr.io/[project-id]/[image-name]
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# GatedAccess Web Service Repo
# Cove Web Service Repo

![coverage][coverage_badge]
## Before diving in 🙌
Expand Down Expand Up @@ -40,13 +40,19 @@ Our custom Ops Agent config can be found in the ``config.yaml`` file. Use the fo
$ gcloud compute scp config.yaml gated-vm:/etc/google-cloud-ops-agent/config.yaml
```

## Secrets Management 🔒
We use Google Cloud Secrets Manager to manage secrets (API keys, passwords, database URLs, etc.)

## Deployments

The app runs on a Google Compute Engine VM with full GCP API permissions and required scopes

### Publishing a new version to Google Artifact Registry
You will need to have write access to our Google Artifact Registry.
Run the ``mvn clean package`` command to publish the new version to Google Artifact Registry
You will need to have write access to our Google Artifact Registry on Google Cloud Platform and install docker on your machine.
1. Run ``gcloud auth configure-docker us-central1-docker.pkg.dev`` to enable [Google Cloud CLI to authenticate requests to Artifact Registry](https://cloud.google.com/artifact-registry/docs/docker/store-docker-container-images#linux).
2. Run the ``mvn clean package`` command to publish the new version to Google Artifact Registry. The required repository path is
configured in the [Jib Maven plugin](https://github.com/GoogleContainerTools/jib/tree/master/jib-maven-plugin) in pom.xml file


### Updating the container image with the new image version
It takes the Compute Engine VM 20 to 30 seconds to update the container image. So we try not to run the following command
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<properties>
<java.version>17</java.version>
<kotlin.version>1.9.23</kotlin.version>
<image.path>gcr.io/gatedaccessdev/cove-vm</image.path>
<image.path>us-central1-docker.pkg.dev/gatedaccessdev/cove-repo/vm</image.path>
</properties>
<dependencyManagement>
<dependencies>
Expand Down
3 changes: 1 addition & 2 deletions src/main/resources/application-prod.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
spring.mvc.async.request-timeout=20000
server.tomcat.threads.max=80
server.port=80

server.port=80

0 comments on commit 5411cf5

Please sign in to comment.