First deployment frontend
This commit is contained in:
18
deploy-frontend.sh
Executable file
18
deploy-frontend.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
HOST=peakup
|
||||
REMOTE_DIR=/var/www/peakup
|
||||
|
||||
echo "==> Building frontend..."
|
||||
cd peakup-frontend
|
||||
npm run build
|
||||
cd ..
|
||||
|
||||
echo "==> Deploying to $HOST..."
|
||||
rsync -av --delete peakup-frontend/dist/ root@$HOST:$REMOTE_DIR/
|
||||
|
||||
echo "==> Reloading nginx..."
|
||||
ssh root@$HOST "systemctl reload nginx"
|
||||
|
||||
echo "==> Done. Frontend available at http://$HOST"
|
||||
1
peakup-frontend/.env
Normal file
1
peakup-frontend/.env
Normal file
@@ -0,0 +1 @@
|
||||
VITE_API_URL=http://localhost:8111
|
||||
1
peakup-frontend/.env.production
Normal file
1
peakup-frontend/.env.production
Normal file
@@ -0,0 +1 @@
|
||||
VITE_API_URL=http://peakup-backend:8111
|
||||
Reference in New Issue
Block a user