Handle deployment auctions in a separate process #21
@ -11,10 +11,11 @@ services:
|
|||||||
cerc-webapp-auction-handler:
|
cerc-webapp-auction-handler:
|
||||||
image: cerc/webapp-deployer-backend:local
|
image: cerc/webapp-deployer-backend:local
|
||||||
restart: always
|
restart: always
|
||||||
|
environment:
|
||||||
|
RUN_AUCTIONS_HANDLER: "true"
|
||||||
volumes:
|
volumes:
|
||||||
- srv:/srv
|
- srv:/srv
|
||||||
- config:/etc/config:ro
|
- config:/etc/config:ro
|
||||||
command: "./scripts/handle-auctions.sh"
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
config:
|
config:
|
||||||
|
@ -11,8 +11,11 @@ if [ "$HANDLE_AUCTION_REQUESTS" = "true" ]; then
|
|||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Not handling auction requests, exiting..."
|
echo "Not handling auction requests"
|
||||||
exit 0
|
|
||||||
|
# k8s integration only supports "always" restart policy, so wait indefinitely
|
||||||
|
# TODO: Exit container once restart policy is supported
|
||||||
|
tail -f /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
STORAGE_ROOT="${STORAGE_ROOT:-/srv}"
|
STORAGE_ROOT="${STORAGE_ROOT:-/srv}"
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
if [ "$RUN_AUCTIONS_HANDLER" = "true" ]; then
|
||||||
|
exec "./scripts/handle-auctions.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
function is_privileged {
|
function is_privileged {
|
||||||
ip link add dummy0 type dummy >/dev/null
|
ip link add dummy0 type dummy >/dev/null
|
||||||
if [[ $? -eq 0 ]]; then
|
if [[ $? -eq 0 ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user