add start.sh

parent 4e984c19
......@@ -16,9 +16,7 @@ COPY . .
# Make the script executable
RUN chmod +x wait-for-postgres.sh
# Use the full path for the entrypoint
ENTRYPOINT ["/app/wait-for-postgres.sh"]
RUN chmod +x ./start.sh
# This is your application's original startup command
CMD ["/bin/bash", "-c", "python apply_test_schema.py && python insert_csv_embeddings.py && uvicorn main:app --host 0.0.0.0 --port 8000"]
\ No newline at end of file
ENTRYPOINT ["./start.sh"]
\ No newline at end of file
#!/bin/bash
set -e
# Run the database readiness check
/app/wait-for-postgres.sh
echo "Setting up schema and inserting data..."
python apply_test_schema.py
python insert_csv_embeddings.py
echo "Database setup complete."
# Start the web server and keep it as the main process
exec uvicorn main:app --host 0.0.0.0 --port 8000
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment