diff --git a/.github/actions/local-app-run/action.yml b/.github/actions/local-app-run/action.yml index 897f5ca976..7f515b5d40 100644 --- a/.github/actions/local-app-run/action.yml +++ b/.github/actions/local-app-run/action.yml @@ -5,7 +5,7 @@ runs: steps: - name: start backend shell: bash - run: docker run -d --network=host ghcr.io/bcgov/cas-reg-backend:${{ github.sha }} "/usr/bin/env" "bash" "-c" "make run" + run: docker run -d --network=host -e "DB_USER=bc_obps" -e "DB_NAME=registration" -e "DB_PORT=5432" -e "DB_HOST=localhost" ghcr.io/bcgov/cas-reg-backend:${{ github.sha }} - name: start frontend shell: bash - run: docker run -d --network=host ghcr.io/bcgov/cas-reg-frontend:${{ github.sha }} "/usr/bin/env" "bash" "-c" "yarn start" + run: docker run -d --network=host ghcr.io/bcgov/cas-reg-frontend:${{ github.sha }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c15f0d2f66..bd66c59aa6 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -179,7 +179,7 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} docker_name: "owasp/zap2docker-stable" - target: "http://0.0.0.0:8000/" + target: "http://127.0.0.1:8000/" rules_file_name: ".zap/rules-backend.tsv" cmd_options: "-a -d -T 5 -m 2" issue_title: OWASP Baseline - Backend diff --git a/bc_obps/Dockerfile b/bc_obps/Dockerfile index 176d3d98e6..f7c82e5e72 100644 --- a/bc_obps/Dockerfile +++ b/bc_obps/Dockerfile @@ -55,4 +55,4 @@ EXPOSE 8000 # Install project dependencies using Poetry RUN poetry install USER ${USER_ID} -CMD ["/usr/bin/env", "bash", "-c", "poetry run python manage.py migrate && poetry run python manage.py runserver 0.0.0.0:8000"] +CMD ["/usr/bin/env", "bash", "-c", "poetry run python manage.py collectstatic --noinput && poetry run python manage.py migrate && poetry run python manage.py runserver"]