Skip to content

Commit

Permalink
updated for using backend to set ENV for ClamAV URL.
Browse files Browse the repository at this point in the history
  • Loading branch information
George Hudson committed Sep 29, 2023
1 parent 16ab89f commit 9e2c437
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
10 changes: 1 addition & 9 deletions .circleci/deployment/commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,7 @@
name: Deploy ClamAV REST application
command: |
cf push clamav-rest -f tdrs-backend/manifest.clamav.yml \
--var cf-space=tanf-prod \
- run:
name: Enable internal route between backend and clamav-rest app
command: |
cf add-network-policy tdp-backend-prod clamav-rest \
-s tanf-prod \
-o hhs-acf-ofa \
--protocol tcp \
--port 9000
--var cf-space=tanf-prod
deploy-frontend:
parameters:
Expand Down
4 changes: 4 additions & 0 deletions scripts/deploy-backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,12 @@ update_backend()
if ["$CF_SPACE" = "tanf-prod" ]; then
# Add network policy to allow backend to access tanf-prod services
cf add-network-policy "$CGAPPNAME_BACKEND" clamav-rest --protocol tcp --port 9000
cf set-env "$CGAPPNAME_BACKEND" AV_SCAN_URL "http://tanf-prod-clamav-rest.apps.internal:9000/scan"
else
cf add-network-policy "$CGAPPNAME_BACKEND" tdp-clamav-nginx-$env --protocol tcp --port 9000

# Add environment varilables for clamav
cf set-env "$CGAPPNAME_BACKEND" AV_SCAN_URL "https://tdp-clamav-nginx-$env.apps.internal:9000/scan"
fi

cd ..
Expand Down
2 changes: 0 additions & 2 deletions tdrs-backend/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,4 @@ applications:
disk_quota: 2G
docker:
image: ((docker-backend))
env:
AV_SCAN_URL: http://((cf-space))-clamav-rest.apps.internal:9000/scan

0 comments on commit 9e2c437

Please sign in to comment.