From 017f962a915069289a3b1df19de18fba54b9efcb Mon Sep 17 00:00:00 2001 From: gerbie_goober Date: Sun, 4 Aug 2024 16:19:41 -0400 Subject: [PATCH] fix: modify docker-compose file to have proper docker image tag --- .github/workflows/A2_Part1.yml | 4 +--- docker-compose.yml | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/A2_Part1.yml b/.github/workflows/A2_Part1.yml index a3ca41d..6834607 100644 --- a/.github/workflows/A2_Part1.yml +++ b/.github/workflows/A2_Part1.yml @@ -38,10 +38,8 @@ jobs: - name: Build the Docker images run: docker-compose build - - name: Tag and push the Docker images + - name: Push the Docker images run: | - docker tag cscc01-linkup_frontend:latest ${{ secrets.DOCKERHUB_USERNAME }}/cscc01-linkup_frontend:latest - docker tag cscc01-linkup_backend:latest ${{ secrets.DOCKERHUB_USERNAME }}/cscc01-linkup_backend:latest docker push ${{ secrets.DOCKERHUB_USERNAME }}/cscc01-linkup_frontend:latest docker push ${{ secrets.DOCKERHUB_USERNAME }}/cscc01-linkup_backend:latest diff --git a/docker-compose.yml b/docker-compose.yml index 16562b9..2bb4fb7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,7 @@ services: # Start with this tag. This will contain all the containers you want t context: ./frontend # Path to the Dockerfile dockerfile: Dockerfile # Name of the Dockerfile container_name: frontend + image: cscc01-linkup_frontend:latest ports: - '80:3000' restart: always @@ -20,6 +21,7 @@ services: # Start with this tag. This will contain all the containers you want t context: ./backend dockerfile: Dockerfile container_name: backend + image: cscc01-linkup_backend:latest environment: # Environment variables to be passed to the container MONGODB_URI: "mongodb+srv://Cluster20901:Yn1EcWJYZVFX@cluster20901.oyjixnu.mongodb.net/linkup?retryWrites=true&w=majority&appName=Cluster20901" ports: