Skip to content

Commit

Permalink
Updating install script on the raspberry pi allowing other usenames a…
Browse files Browse the repository at this point in the history
…nd not limitted to pi (#84)

Co-authored-by: Matthias Niedermaier <matthias.niedermaier@googlemail.com>
  • Loading branch information
mniedermaier and Matthias Niedermaier authored Jan 23, 2025
1 parent 668375f commit c191f3d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions software/installRPI.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ EOF
### Stopping containers
###
echo -ne "${GREEN}# Stopping containers ... \n${ENDCOLOR}"
ssh -t "$DEVICE_USER"@"$DEVICE_IP" sudo docker compose -f /home/pi/CybICS/docker-compose.yaml down || true
ssh -t "$DEVICE_USER"@"$DEVICE_IP" sudo docker compose -f /home/$DEVICE_USER/CybICS/docker-compose.yaml down || true

###
### add some configs to the kernel command line
Expand Down Expand Up @@ -199,15 +199,15 @@ echo -ne "${GREEN}# Build containers ... \n${ENDCOLOR}"
### Install containers on the raspberry
###
echo -ne "${GREEN}# Install containers on the raspberry ... \n${ENDCOLOR}"
ssh "$DEVICE_USER"@"$DEVICE_IP" mkdir -p /home/pi/CybICS
scp "$GIT_ROOT"/software/docker-compose.yaml "$DEVICE_USER"@"$DEVICE_IP":/home/pi/CybICS/docker-compose.yaml
ssh -R 5000:localhost:5000 -t "$DEVICE_USER"@"$DEVICE_IP" sudo docker compose -f /home/pi/CybICS/docker-compose.yaml pull
ssh "$DEVICE_USER"@"$DEVICE_IP" mkdir -p /home/$DEVICE_USER/CybICS
scp "$GIT_ROOT"/software/docker-compose.yaml "$DEVICE_USER"@"$DEVICE_IP":/home/$DEVICE_USER/CybICS/docker-compose.yaml
ssh -R 5000:localhost:5000 -t "$DEVICE_USER"@"$DEVICE_IP" sudo docker compose -f /home/$DEVICE_USER/CybICS/docker-compose.yaml pull

###
### Starting containers
###
echo -ne "${GREEN}# Starting containers ... \n${ENDCOLOR}"
ssh -t "$DEVICE_USER"@"$DEVICE_IP" sudo docker compose -f /home/pi/CybICS/docker-compose.yaml up -d --remove-orphans
ssh -t "$DEVICE_USER"@"$DEVICE_IP" sudo docker compose -f /home/$DEVICE_USER/CybICS/docker-compose.yaml up -d --remove-orphans

###
### all done
Expand Down

0 comments on commit c191f3d

Please sign in to comment.