Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making it easier to deploy QueryTree #62

Open
PandelisZ opened this issue May 17, 2019 · 6 comments
Open

Making it easier to deploy QueryTree #62

PandelisZ opened this issue May 17, 2019 · 6 comments

Comments

@PandelisZ
Copy link
Member

PandelisZ commented May 17, 2019

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 PandelisZ changed the title Making it easier to try and deploy QueryTree Making it easier to deploy QueryTree May 17, 2019
@d4nt
Copy link
Contributor

d4nt commented May 17, 2019

@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)

@PandelisZ
Copy link
Member Author

Yep! Saw that in my feed and thought I should share!

@stale
Copy link

stale bot commented Jun 16, 2019

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.

@stale stale bot added the wontfix label Jun 16, 2019
@d4nt d4nt added pinned and removed wontfix labels Jun 19, 2019
@martonboti
Copy link

Hey, is there a way I can deploy this to heroku?

@PandelisZ
Copy link
Member Author

PandelisZ commented Feb 19, 2020

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

@d4nt
Copy link
Contributor

d4nt commented Feb 19, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants