From f51fb7128ebc38b1bcf86646775be34e2fa4055e Mon Sep 17 00:00:00 2001 From: Nuwan Samarasinghe Date: Mon, 16 Sep 2024 13:27:12 +0100 Subject: [PATCH] application startup fixes --- .github/workflows/pullpreview.yml | 22 ++++++++++++++++++++++ docker-compose.pullpreview.yml | 9 ++------- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.github/workflows/pullpreview.yml b/.github/workflows/pullpreview.yml index 71e6dce..7cba567 100644 --- a/.github/workflows/pullpreview.yml +++ b/.github/workflows/pullpreview.yml @@ -4,7 +4,24 @@ on: types: [ labeled, unlabeled, synchronize, closed, reopened ] jobs: + setup: + uses: communitiesuk/funding-service-design-workflows/.github/workflows/determine-jobs.yml@main + with: + environment: ${{ inputs.environment }} + + paketo_build: + needs: [ setup ] + permissions: + packages: write + uses: communitiesuk/funding-service-design-workflows/.github/workflows/package.yml@main + with: + version_to_build: sha-${{ github.sha }} + owner: ${{ github.repository_owner }} + application: funding-service-design-fund-application-builder + assets_required: false + deploy: + needs: [ setup, paketo_build ] permissions: contents: read # to fetch code (actions/checkout) deployments: write # to delete deployments @@ -23,6 +40,11 @@ jobs: role-session-name: FUNDING_SERVICE_DESIGN_FUND_APPLICATION_BUILDER_PULLPREVIEW aws-region: eu-west-2 - uses: actions/checkout@v2 + + - name: Inject env specific values into docker compose + run: | + yq -i 'services.fab.image = "ghcr.io/communitiesuk/funding-service-design-fund-application-builder:sha-${{ github.sha }}"' docker-compose.pullpreview.yml + - uses: pullpreview/action@v5.6.1 with: compose_files: docker-compose.pullpreview.yml diff --git a/docker-compose.pullpreview.yml b/docker-compose.pullpreview.yml index 56a9410..2aeaa0d 100644 --- a/docker-compose.pullpreview.yml +++ b/docker-compose.pullpreview.yml @@ -1,12 +1,7 @@ services: fab: - hostname: fab - build: - context: ../funding-service-design-fund-application-builder - dockerfile: Dockerfile - args: - - USE_DEV_REQUIREMENTS=true - volumes: ['../funding-service-design-fund-application-builder:/app'] + container_name: fab + image: ghcr.io/communitiesuk/funding-service-design-form-designer-adapter:latest command: ["sh", "-c", "python -m flask db upgrade && python -m debugpy --listen 0.0.0.0:5601 -m flask run --no-debugger --host 0.0.0.0 --port 8080"] ports: - 8080:8080