Handle deployment auctions in a separate process #21

Merged
ashwin merged 3 commits from deep-stack/webapp-deployment-status-api:pm-separate-auctions into main 2024-10-25 09:00:47 +00:00
3 changed files with 11 additions and 3 deletions
Showing only changes of commit 07f6d5a0c9 - Show all commits

View File

@ -11,10 +11,11 @@ services:
cerc-webapp-auction-handler:
image: cerc/webapp-deployer-backend:local
restart: always
environment:
RUN_AUCTIONS_HANDLER: "true"
volumes:
- srv:/srv
- config:/etc/config:ro
command: "./scripts/handle-auctions.sh"
volumes:
config:

View File

@ -11,8 +11,11 @@ if [ "$HANDLE_AUCTION_REQUESTS" = "true" ]; then
exit 2
fi
else
echo "Not handling auction requests, exiting..."
exit 0
echo "Not handling auction requests"
# k8s integration only supports "always" restart policy, so wait indefinitely
# TODO: Exit container once restart policy is supported
tail -f /dev/null
fi
STORAGE_ROOT="${STORAGE_ROOT:-/srv}"

View File

@ -1,5 +1,9 @@
#!/bin/bash
if [ "$RUN_AUCTIONS_HANDLER" = "true" ]; then
exec "./scripts/handle-auctions.sh"
fi
function is_privileged {
ip link add dummy0 type dummy >/dev/null
if [[ $? -eq 0 ]]; then