Files
Project-Monitor/docker/entry.sh
Sami Abuzakuk 5ba5107a3b
All checks were successful
Build Container / build (push) Successful in 3m51s
Add auto alembic upgrade in container
2025-10-14 20:26:51 +02:00

28 lines
577 B
Bash

#!/bin/bash
printenv | while read line; do echo "export $line"; done > /etc/container_environment
source /app/backend/venv/bin/activate
# Navigate to the frontend directory, install dependencies, and start the Svelte app
cd frontend
npm install
npm run build
npm run dev -- --host 0.0.0.0 --port 8080 &
# Navigate back to the root directory
cd ..
# Setup exec venv
cd backend/exec_folder
python3 -m venv venv
cd ../..
# Start the backend using uvicorn
cd backend
alembic upgrade head
uvicorn backend:app --host 0.0.0.0 --port 8000 &
cd ..
# Start the cron daemon
cron -f