From 45c42b65227e49a8cb3400cc1ba91ed98475a33c Mon Sep 17 00:00:00 2001 From: Roshan Piyush Date: Wed, 7 Feb 2024 21:27:34 +0530 Subject: [PATCH] Fix publish --- .github/workflows/publish.yml | 22 ++++++++++++---------- services/workshop/runner.sh | 4 ++-- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2f6a266b..158a9821 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -82,61 +82,63 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build crapi-identity all platforms and conditionally push to Docker Hub + - name: Build crapi-identity all platforms and push to Docker Hub uses: docker/build-push-action@v3 with: context: ./services/identity tags: crapi/crapi-identity:${{ env.TAG_LATEST }},crapi/crapi-identity:${{ env.TAG_NAME }} platforms: ${{ env.PLATFORMS }} + push: true cache-from: type=gha,scope=identity-service cache-to: type=gha,mode=max,scope=identity-service - - name: Build crapi-workshop all platforms and conditionally push to Docker Hub + - name: Build crapi-workshop all platforms and push to Docker Hub uses: docker/build-push-action@v3 with: context: ./services/workshop tags: crapi/crapi-workshop:${{ env.TAG_LATEST }},crapi/crapi-workshop:${{ env.TAG_NAME }} platforms: ${{ env.PLATFORMS }} + push: true cache-from: type=gha,scope=workshop-service cache-to: type=gha,mode=max,scope=workshop-service - - name: Build crapi-community all platforms and conditionally push to Docker Hub + - name: Build crapi-community all platforms and push to Docker Hub uses: docker/build-push-action@v3 with: context: ./services/community tags: crapi/crapi-community:${{ env.TAG_LATEST }},crapi/crapi-community:${{ env.TAG_NAME }} platforms: ${{ env.PLATFORMS }} + push: true cache-from: type=gha,scope=community-service cache-to: type=gha,mode=max,scope=community-service - - name: Build crapi-web all platforms and conditionally push to Docker Hub + - name: Build crapi-web all platforms and push to Docker Hub uses: docker/build-push-action@v3 with: context: ./services/web tags: crapi/crapi-web:${{ env.TAG_LATEST }},crapi/crapi-web:${{ env.TAG_NAME }} platforms: ${{ env.PLATFORMS }} + push: true cache-from: type=gha,scope=web-service cache-to: type=gha,mode=max,scope=web-service - - name: Build gateway-service all platforms and conditionally push to Docker Hub + - name: Build gateway-service all platforms and push to Docker Hub uses: docker/build-push-action@v3 with: context: ./services/gateway-service tags: crapi/gateway-service:${{ env.TAG_LATEST }},crapi/gateway-service:${{ env.TAG_NAME }} platforms: ${{ env.PLATFORMS }} + push: true cache-from: type=gha,scope=gateway-service cache-to: type=gha,mode=max,scope=gateway-service - - name: Build mailhog all platforms and conditionally push to Docker Hub + - name: Build mailhog all platforms and push to Docker Hub uses: docker/build-push-action@v3 with: context: ./services/mailhog tags: crapi/mailhog:${{ env.TAG_LATEST }},crapi/mailhog:${{ env.TAG_NAME }} platforms: ${{ env.PLATFORMS }} + push: true cache-from: type=gha,scope=mailhog-service cache-to: type=gha,mode=max,scope=mailhog-service - - name: Dump docker logs on failure - if: failure() - uses: jwalton/gh-docker-logs@v2 - diff --git a/services/workshop/runner.sh b/services/workshop/runner.sh index 27b85160..445755e1 100755 --- a/services/workshop/runner.sh +++ b/services/workshop/runner.sh @@ -39,9 +39,9 @@ if [ "$TLS_ENABLED" = "true" ] || [ "$TLS_ENABLED" = "1" ]; then echo "TLS_CERTIFICATE: $TLS_CERTIFICATE" echo "TLS_KEY: $TLS_KEY" # python3 manage.py runserver_plus --cert-file $TLS_CERTIFICATE --key-file $TLS_KEY --noreload 0.0.0.0:${SERVER_PORT} - gunicorn --workers=2 --threads=10 --timeout 60 --bind 0.0.0.0:${SERVER_PORT} --certfile $TLS_CERTIFICATE --keyfile $TLS_KEY --log-level=debug crapi_site.wsgi + gunicorn --workers=1 --threads=20 --timeout 60 --bind 0.0.0.0:${SERVER_PORT} --certfile $TLS_CERTIFICATE --keyfile $TLS_KEY --log-level=debug crapi_site.wsgi else echo "TLS is DISABLED" # python3 manage.py runserver 0.0.0.0:${SERVER_PORT} --noreload - gunicorn --workers=2 --threads=10 --timeout 60 --bind 0.0.0.0:${SERVER_PORT} --log-level=debug crapi_site.wsgi + gunicorn --workers=1 --threads=20 --timeout 60 --bind 0.0.0.0:${SERVER_PORT} --log-level=debug crapi_site.wsgi fi