Re-order layers in main Dockerfile to have all the python/backend related layers first
Add these layers in the base image and have prod inherit from it
Create new dev image which inherits from base which simply runs alembic migrations and uvicorn on start
Create new frontend Dockerfile for docker compose to use. It mainly just runs npm install and npm run dev
Create docker compose file to run two containers: backend (target dev) and frontend (from new Dockerfile)
dataline_dev volume to persist sqlite db
direct volume into text2sql-backend/dataline. The reason we currently can't do it on the entiretext2sql-backend/ dir is mainly because things like the /home/dataline/backend/venv/ folder will get swept away. Not a difficult fix, but maybe not one worth looking into now.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Issue #, if available: Closes #115
Description of changes:
base
image and haveprod
inherit from itdev
image which inherits frombase
which simply runs alembic migrations and uvicorn on startnpm install
andnpm run dev
dev
) and frontend (from new Dockerfile)dataline_dev
volume to persist sqlite dbtext2sql-backend/dataline
. The reason we currently can't do it on the entiretext2sql-backend/
dir is mainly because things like the/home/dataline/backend/venv/
folder will get swept away. Not a difficult fix, but maybe not one worth looking into now.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.