fix cp and linking for web
This commit is contained in:
@ -17,8 +17,10 @@ cd $LOCAL_REPO/web
|
|||||||
#yarn install
|
#yarn install
|
||||||
#yarn build:photos # puts the built files in the web/apps/photos/out directory
|
#yarn build:photos # puts the built files in the web/apps/photos/out directory
|
||||||
|
|
||||||
|
echo "$LOCAL_REPO/web/apps/photos/out"
|
||||||
|
|
||||||
# make sure the photos app is built
|
# make sure the photos app is built
|
||||||
if [ ! -d "$LOCAL_REPO/apps/photos/out" ]; then
|
if [ ! -d "$LOCAL_REPO/web/apps/photos/out" ]; then
|
||||||
echo "The photos app has not been built. Please build the app and rerun the script."
|
echo "The photos app has not been built. Please build the app and rerun the script."
|
||||||
|
|
||||||
# print the steps to build the photos app
|
# print the steps to build the photos app
|
||||||
@ -27,12 +29,13 @@ if [ ! -d "$LOCAL_REPO/apps/photos/out" ]; then
|
|||||||
echo "git submodule update --init --recursive"
|
echo "git submodule update --init --recursive"
|
||||||
echo "yarn install"
|
echo "yarn install"
|
||||||
echo "yarn build:photos"
|
echo "yarn build:photos"
|
||||||
|
|
||||||
|
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo cp -r $LOCAL_REPO/apps/photos/out /var/www/ente/photos
|
# make sure the destination directory exists
|
||||||
|
sudo mkdir -p /var/www/ente
|
||||||
|
|
||||||
|
sudo cp -r $LOCAL_REPO/web/apps/photos/out /var/www/ente/photos
|
||||||
|
|
||||||
# configure nginx to serve the photos app on ente.sa.vin
|
# configure nginx to serve the photos app on ente.sa.vin
|
||||||
sudo tee /etc/nginx/sites-available/ente.sa.vin.conf > /dev/null <<EOL
|
sudo tee /etc/nginx/sites-available/ente.sa.vin.conf > /dev/null <<EOL
|
||||||
@ -65,6 +68,8 @@ server {
|
|||||||
}
|
}
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
|
sudo ln -s /etc/nginx/sites-available/entep.sa.vin.conf /etc/nginx/sites-enabled/
|
||||||
|
|
||||||
# reload nginx to apply changes
|
# reload nginx to apply changes
|
||||||
sudo systemctl reload nginx
|
sudo systemctl reload nginx
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user