QueryTree
QueryTree copied to clipboard
Making it easier to deploy QueryTree
Hola,
So I started this branch ages ago but thought it'd be good to run the idea past.
With the success and popularity of the docker image being so easy for people to try QT out with. I thought why not make it easy to spin up a live version of QT in azure of heroku too.
https://www.microsoft.com/developerblog/2017/01/17/the-deploy-to-azure-button/
The limiting factor for this though would be to add support for a proper DB instead of sqlite so that QT can run in the cloud and not rely on a filesystem.
So if someone wants to take up the challenge of substituting sqlite for psql or mysql.
A half attempt: https://github.com/pandelisz/querytree
@PandelisZ I love it! I've actually been working in 'develop' on enabling QT to use SQL Server as it's storage system. It's pretty much done, it just needs some testing. (See the 'DataStore' option in https://github.com/d4software/QueryTree/blob/develop/docs/customizing.md)
Yep! Saw that in my feed and thought I should share!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Hey, is there a way I can deploy this to heroku?
~No I don't think so.~
Edit: You should be able to with an external SQLServer DB! There is even a sqlServer add-on available: https://elements.heroku.com/addons/mssql
Because query tree uses a stateful sqlite database that lives with the docker image you would not be able to deploy it to a heroku environment. Heroku is notoriously ephemeral which means every new deploy would wipe the sqlite db.
To be able to deploy to Heroku or more stateless services QueryTree would need to support an external database for its connections which is possible as it uses EntityFramework to interface with sqlite anyway.
@d4nt That sounds about right, right?
The reason this works on azure is the box it deploys to is stateful, its a ubuntu vm that will never be destroyed so the sqlite db volume would persist.
If you were to attempt to deploy to heroku:
You would be able to create a heroku deployment by using heroku's docker features https://devcenter.heroku.com/articles/build-docker-images-heroku-yml
And if you'd like to take a look at implementing an external databases I'd start here: https://github.com/d4software/QueryTree/blob/master/Web/Startup.cs#L52
QueryTree supports the use of an external Microsoft SQL Server database for its user accounts and report definitions, so it could probably be run on heroku in that mode. Take a look at the DataStore setting in the customizing.md file.
Heroku is not something I’ve tried though, so if you get it working please report back to the community.