Adding deployment to raspberrypi
This commit is contained in:
18
scripts/deploy.sh
Normal file
18
scripts/deploy.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
REPO_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
SERVICE_NAME="birdcam"
|
||||
|
||||
echo "Pulling latest code..."
|
||||
cd "$REPO_DIR"
|
||||
git pull origin main
|
||||
|
||||
echo "Installing dependencies..."
|
||||
poetry install --without pi --no-dev
|
||||
|
||||
echo "Restarting service..."
|
||||
sudo systemctl restart "$SERVICE_NAME"
|
||||
sudo systemctl status "$SERVICE_NAME" --no-pager
|
||||
|
||||
echo "Deployed successfully."
|
||||
Reference in New Issue
Block a user