Skip to content

Commit

Permalink
chore: debug docker images for zap scan to work
Browse files Browse the repository at this point in the history
  • Loading branch information
Sepehr-Sobhani committed Sep 21, 2023
1 parent 2239e46 commit 4a44326
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/actions/local-app-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bc_obps/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 4a44326

Please sign in to comment.