Compare commits
No commits in common. "d520ec4c863720bdd9055e76592b8e4324d01435" and "1d0464c21915ee6d48be316f80172427013e6385" have entirely different histories.
d520ec4c86
...
1d0464c219
5 changed files with 1 additions and 22 deletions
|
|
@ -7,8 +7,4 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Make startup script executable
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||||
RUN chmod +x start.sh
|
|
||||||
|
|
||||||
# Run migrations then start server
|
|
||||||
CMD ["./start.sh"]
|
|
||||||
|
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "🔄 Running database migrations..."
|
|
||||||
|
|
||||||
# Run any migration scripts that exist
|
|
||||||
for script in /app/migrations/*.py; do
|
|
||||||
if [ -f "$script" ]; then
|
|
||||||
echo " Running: $(basename $script)"
|
|
||||||
python "$script" || echo " ⚠️ Migration $script failed (may already be applied)"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "✅ Migrations complete. Starting server..."
|
|
||||||
|
|
||||||
# Start the main application
|
|
||||||
exec uvicorn main:app --host 0.0.0.0 --port 8000
|
|
||||||
Loading…
Add table
Reference in a new issue