leothesouthafrican's picture
Initial commit on web_app_temp
de234b1
raw
history blame contribute delete
596 Bytes
#!/bin/sh
set -e
# Check the STAGE environment variable
if [ "$STAGE" = "backend" ]; then
# Update and install dependencies
apt-get update && apt-get install -y --no-install-recommends gcc g++
# Install python dependencies
pip install --no-cache-dir -r requirements.txt
elif [ "$STAGE" = "frontend" ]; then
# Install dependencies
npm install
# Adjust permissions and build in a single command
chown -R node:node /app/frontend
npm run build
# Install serve
npm install -g serve
else
echo "Error: Invalid or no STAGE specified"
exit 1
fi