blueprintue / blueprintue-self-hosted-edition

Useful if you want to host your own blueprintUE website for your company.
https://blueprintue.com
MIT License
68 stars 12 forks source link

[QUESTION] Is it possible to use this with an sqlite database? #59

Open parnic-sks opened 6 months ago

parnic-sks commented 6 months ago

Sorry if an Issue isn't the right place to post this - I didn't see a Discussions tab or anything.

Description

I see that sqlite is listed as a possible DATABASE_DRIVER value, but I'm having trouble getting it to work. I've got this application hosted in a small AWS VM and it's working well, but since the VM only has 1GB RAM and it's hosting a few other things at the same time, MariaDB is occupying 9% of the memory and I'd rather be able to reclaim that. If it's possible to run this against sqlite, we could get more mileage out of the VM.

Steps to reproduce this issue

  1. Use docker-compose-smtp.yml example script, but change DATABASE_DRIVER to sqlite
  2. Start docker container
  3. Attempt to view the site
  4. See Error

Expected behavior

No error, site works with sqlite db instead of maria/mysql.

Actual behavior

Site gives a message:

Error

An error occured, please try later.

Additional context

I'm using the https://github.com/blueprintue/blueprintue-self-hosted-edition/blob/main/docker-examples/docker-compose-smtp.yml docker example as a base, and everything is working fine with DATABASE_DRIVER=mysql. When I switch DATABASE_DRIVER to sqlite and docker compose up -d, the site gives me an "Error. An error occured, please try later." page, and "docker logs blueprintue-self-hosted-edition" don't show anything other than the GET request.

rancoud commented 6 months ago

Hello,

For the moment the website don't support sqlite and postgres.

The options listed come from my library supporting these engines generally speaking.

To be fully compatible, I'd have to do the following:

  1. provide a different dump for each engine
  2. adapt the sql code in app/models to support the selected engine
  3. duplicate and update CI workflows build and validate to support each engine
  4. provide a different docker file for each engine

It can be done in the future.