diff --git a/.github/actions/image_builder/action.yaml b/.github/actions/image_builder/action.yaml index e9f9287e1..974a761c5 100644 --- a/.github/actions/image_builder/action.yaml +++ b/.github/actions/image_builder/action.yaml @@ -30,6 +30,6 @@ runs: export VERSION="${{ inputs.stage }}-$CUR_DATE-$SHA_SHORT" export STAGE="${{ inputs.stage }}" export APP_DIR="$PWD/${{ inputs.dockerfile_location }}" - image_name="${{ inputs.ecr_image_repo_name }}" docker_login="true" version="$VERSION" account="${{ inputs.aws_account_id }}" app_dir="$APP_DIR" publish="${{ inputs.should_publish }}" ./bin/dockerize + image_name="${{ inputs.ecr_image_repo_name }}" version="$VERSION" account="${{ inputs.aws_account_id }}" app_dir="$APP_DIR" publish="${{ inputs.should_publish }}" ./bin/dockerize echo "Docker tag is: $VERSION" echo $VERSION > /tmp/.DOCKER_IMAGE_VERSION diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index c1a05d386..5bcae640d 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -51,7 +51,7 @@ jobs: stage: dev aws_account_id: ${{ env.AWS_ACCOUNT_ID_DEV }} should_publish: true - ecr_image_repo_name: cognee-dev-backend-cognee + ecr_image_repo_name: cognee-dev-backend-cognee-ecr dockerfile_location: ./ - name: Export Cognee image tag diff --git a/.github/workflows/cd_prd.yaml b/.github/workflows/cd_prd.yaml index 49815d98e..00d4d98cc 100644 --- a/.github/workflows/cd_prd.yaml +++ b/.github/workflows/cd_prd.yaml @@ -49,7 +49,7 @@ jobs: # aws_account_id: ${{ env.AWS_ACCOUNT_ID_DEV }} # should_publish: true # ecr_image_repo_name: promethai-prd-backend-promethai-backend -# # ecr_image_repo_name: cognee-prd-backend-cognee +# # ecr_image_repo_name: cognee-prd-backend-cognee-ecr # dockerfile_location: ./ # - name: Export Docker image tag # id: export-promethai-docker-tag diff --git a/bin/dockerize b/bin/dockerize index d20ebec7a..6302ee1e0 100755 --- a/bin/dockerize +++ b/bin/dockerize @@ -11,9 +11,11 @@ VERSION="$STAGE-$CUR_DATE-$SHA_SHORT" IMAGE_NAME=${image_name:-cognee-${STAGE}} REPO_NAME="${AWS_REPOSITORY}/${IMAGE_NAME}" -FULL_IMAGE_NAME="${REPO_NAME}:${VERSION}" +FULL_IMAGE_NAME="${REPO_NAME}" APP_DIR=${app_dir:-"."} +# ECHO "$FULL_IMAGE_NAME:latest" + PUBLISH=${publish:-false} echo "Building docker image ${FULL_IMAGE_NAME} located in dir ${app_dir}" @@ -21,7 +23,7 @@ echo "Building docker image ${FULL_IMAGE_NAME} located in dir ${app_dir}" pushd "${APP_DIR}" && docker buildx build --platform linux/amd64 \ --build-arg STAGE=${STAGE} \ - -t "${FULL_IMAGE_NAME}" . && + -t "${FULL_IMAGE_NAME}:latest" -t "${FULL_IMAGE_NAME}:${VERSION}" . && echo "${VERSION}" >/tmp/.DOCKER_IMAGE_VERSION && echo "Successfully built docker image ${FULL_IMAGE_NAME}" @@ -33,4 +35,4 @@ if [ "${PUBLISH}" = true ]; then fi docker push "${FULL_IMAGE_NAME}" && echo "Successfully pushed docker image ${FULL_IMAGE_NAME} to ECR repository" -fi \ No newline at end of file +fi