File tree Expand file tree Collapse file tree 3 files changed +14
-7
lines changed
Expand file tree Collapse file tree 3 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,21 @@ REMOTE_DIR="${DEPLOY_REMOTE_DIR:-www/profullstack.com/pdf}"
2626# Create SSH options
2727SSH_OPTS=" -p $REMOTE_PORT "
2828
29- # Deploy the code first
29+ # Deploy the code first using deploy.sh
3030echo -e " ${YELLOW} Running deployment script...${NC} "
3131./bin/deploy.sh
3232
3333echo -e " ${GREEN} Deployment successful!${NC} "
3434
35- # Run install-service.sh on the remote server to install dependencies and set up the service
36- echo -e " ${YELLOW} Installing service and dependencies on remote server...${NC} "
37- ssh $SSH_OPTS $REMOTE_USER @$REMOTE_HOST " cd $REMOTE_DIR && chmod +x ./bin/install-service.sh && sudo ./bin/install-service.sh"
35+ # Check if INSTALL_SERVICE was set to true in the .env file
36+ # If it was, the service was already installed by deploy.sh
37+ if [ " $INSTALL_SERVICE " != " true" ]; then
38+ # Run install-service.sh on the remote server to install dependencies and set up the service
39+ echo -e " ${YELLOW} Installing service and dependencies on remote server...${NC} "
40+ ssh $SSH_OPTS $REMOTE_USER @$REMOTE_HOST " cd $REMOTE_DIR && chmod +x ./bin/install-service.sh && sudo ./bin/install-service.sh"
41+ else
42+ echo -e " ${YELLOW} Skipping service installation as it was already done by deploy.sh...${NC} "
43+ fi
3844
3945# Run Supabase setup and migrations on the remote server
4046echo -e " ${YELLOW} Running Supabase setup and migrations on remote server...${NC} "
6167 exit 1
6268fi
6369
64- # The service is already started by install- service.sh, but we'll restart it to be sure
70+ # Restart the service after all operations are complete
6571echo -e " ${YELLOW} Restarting service...${NC} "
6672ssh $SSH_OPTS $REMOTE_USER @$REMOTE_HOST " sudo systemctl restart profullstack-pdf.service"
6773
Original file line number Diff line number Diff line change @@ -90,7 +90,8 @@ if ssh $SSH_OPTS $REMOTE_USER@$REMOTE_HOST "[ -d $REMOTE_DIR ]"; then
9090 echo -e " cd $REMOTE_DIR && sudo ./bin/install-service.sh"
9191 fi
9292
93- # Always reload systemd daemon after deployment
93+ # We don't restart services here - that's handled by deploy-with-migrations.sh
94+ # Just reload the systemd daemon
9495 echo -e " ${YELLOW} Reloading systemd daemon on remote host...${NC} "
9596 ssh $SSH_OPTS $REMOTE_USER @$REMOTE_HOST " sudo systemctl daemon-reload"
9697 else
Original file line number Diff line number Diff line change 11# A string used to distinguish different Supabase projects on the same host. Defaults to the working
22# directory name when running `supabase init`.
3- project_id = " profullstack-pdf "
3+ project_id = " arokhsfbkdnfuklmqajh "
44
55[api ]
66# Port to use for the API URL.
You can’t perform that action at this time.
0 commit comments