Skip to content

Commit

Permalink
fix: update deployment path configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Justhiro55 committed Nov 15, 2024
1 parent e31531b commit eb3f8a1
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash
# env

# Specify the SSH key path with the -i option (adjust the funcy-gcp part as needed)

if [ ! -f .env.deploy ]; then
echo "Error: .env.deploy file not found"
exit 1
Expand Down Expand Up @@ -47,15 +50,15 @@ scp -r -i ~/Desktop/funcy_gcp \
# deployment and setup of files
echo "Setting up files on remote server..."
ssh $USER@$APIDOMAIN -i ~/Desktop/funcy_gcp '
sudo mkdir -p /go/src/app
sudo rm -rf /go/src/app/*
sudo mkdir -p /var/www/funcy-backend/app
sudo rm -rf /var/www/funcy-backend/app/*
sudo cp -r ~/scp/app/* /go/src/app/
sudo cp -r ~/scp/app/* /var/www/funcy-backend/app
# Set execute permissions only for binary files
for file in main file-server; do
if [ -f "/go/src/app/$file" ]; then
sudo chmod +x "/go/src/app/$file"
if [ -f "/var/www/funcy-backend/$file" ]; then
sudo chmod +x "/var/www/funcy-backend/$file"
fi
done
Expand Down

0 comments on commit eb3f8a1

Please sign in to comment.