Skip to content

fix(build): Adding build/push for kcworks-frontend image to github wo… #747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,15 @@ jobs:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: |
docker build . --file Dockerfile --platform=linux/amd64 --tag $DOCKERHUB_REGISTRY/$DOCKERHUB_USERNAME/$IMAGE_NAME:$RELEASE_VERSION --tag $GITHUB_REGISTRY/$DOCKERHUB_USERNAME/$IMAGE_NAME:$RELEASE_VERSION --tag $ECR_REGISTRY/kcworks:$RELEASE_VERSION
docker build ./docker/nginx_production/ --platform=linux/amd64 --tag $DOCKERHUB_REGISTRY/$DOCKERHUB_USERNAME/$IMAGE_NAME-frontend:$RELEASE_VERSION --tag $GITHUB_REGISTRY/$DOCKERHUB_USERNAME/$IMAGE_NAME-frontend:$RELEASE_VERSION --tag $ECR_REGISTRY/$IMAGE_NAME-frontend:$RELEASE_VERSION
docker image ls

- name: Push Image to Docker Hub
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
run: |
docker push $DOCKERHUB_REGISTRY/$DOCKERHUB_USERNAME/$IMAGE_NAME --all-tags
docker push $DOCKERHUB_REGISTRY/$DOCKERHUB_USERNAME/$IMAGE_NAME-frontend --all-tags

- name: Push production or staging image to Amazon ECR
if: env.RELEASE_VERSION == 'production' || env.RELEASE_VERSION == 'staging' || env.RELEASE_VERSION == 'dev'
Expand All @@ -135,6 +137,7 @@ jobs:
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
run: |
docker push $ECR_REGISTRY/kcworks:$RELEASE_VERSION
docker push $ECR_REGISTRY/$IMAGE_NAME-frontend:$RELEASE_VERSION

- name: Start containers
if: always()
Expand Down
4 changes: 2 additions & 2 deletions docker/nginx_production/conf.d/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
gzip_vary on;

upstream ui_server {
server web-ui:5000 fail_timeout=0;
server kcworks-ui:5000 fail_timeout=0;
}
upstream api_server {
server web-api:5001 fail_timeout=0;
server kcworks-api:5001 fail_timeout=0;
}


Expand Down
Loading