Ajit Panday commited on
Commit
8514019
·
1 Parent(s): 7d72bcf

Add startup script and update database configuration

Browse files
Files changed (3) hide show
  1. alembic.ini +1 -1
  2. huggingface.yml +4 -1
  3. start.sh +9 -0
alembic.ini CHANGED
@@ -50,7 +50,7 @@ version_path_separator = os # Use os.pathsep. Default configuration used for ne
50
  # are written from script.py.mako
51
  # output_encoding = utf-8
52
 
53
- sqlalchemy.url = driver://user:pass@localhost/dbname
54
 
55
 
56
  [post_write_hooks]
 
50
  # are written from script.py.mako
51
  # output_encoding = utf-8
52
 
53
+ sqlalchemy.url = ${DATABASE_URL}
54
 
55
 
56
  [post_write_hooks]
huggingface.yml CHANGED
@@ -1,3 +1,6 @@
1
  image: python:3.9
2
  pip:
3
- - requirements.txt
 
 
 
 
1
  image: python:3.9
2
  pip:
3
+ - requirements.txt
4
+ run: |
5
+ chmod +x start.sh
6
+ ./start.sh
start.sh ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Run database migrations
4
+ cd app
5
+ alembic upgrade head
6
+
7
+ # Start the application
8
+ cd ..
9
+ uvicorn main:app --host 0.0.0.0 --port $PORT