Adapted database scripts to be run from the root directoryt
This commit is contained in:
parent
fbe7219af2
commit
59d379f657
@ -4,4 +4,5 @@ WORKDIR /app
|
||||
RUN pip install -r requirements.txt
|
||||
COPY . /app
|
||||
ENTRYPOINT [ "python" ]
|
||||
RUN ["scripts/create_database.py"]
|
||||
CMD ["app.py" ]
|
@ -9,7 +9,7 @@ def create_connection(db_file):
|
||||
conn = sqlite3.connect(db_file)
|
||||
|
||||
# Execute creation scripts
|
||||
sql = open("create_tables.sql", "r");
|
||||
sql = open("scripts/create_tables.sql", "r");
|
||||
conn.executescript(sql.read())
|
||||
|
||||
print(sqlite3.version)
|
||||
@ -21,4 +21,4 @@ def create_connection(db_file):
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
create_connection(r"../data/wmgzon.db")
|
||||
create_connection(r"./data/wmgzon.db")
|
||||
|
Loading…
Reference in New Issue
Block a user