Giter Site home page Giter Site logo

Comments (5)

tdruez avatar tdruez commented on June 18, 2024 1

@cco3 PR at #57
Let me know it that approach works for you.

from scancode.io.

tdruez avatar tdruez commented on June 18, 2024

No particular reasons, SQLite should work mostly fine for a single user usage, although it hasn't been extensively tested.
See https://docs.djangoproject.com/en/3.1/ref/databases/#sqlite-notes for the SQLite limitations.

I will provide a simple way to setup SQLite over PostgreSQL with documentation.
In the mean time you can already try a SQLite setup it with the following steps:

  • After the make envfile do not run the make cleandb, instead:
  • Edit the scancodeio/settings/base.py and locate the DATABASES setting
  • Replace "ENGINE": "django.db.backends.postgresql" with "ENGINE": "django.db.backends.sqlite3"
  • Replace "NAME": os.getenv("SCANCODEIO_DB_NAME", "scancodeio") with "NAME": "sqlite3.db"
  • Run make migrate

In summary:

git clone [email protected]:nexB/scancode.io.git && cd scancode.io
make dev
make envfile
[Edit the settings]
make migrate

We'll add a new make sqlite command that will take care of the settings and the migration.

from scancode.io.

pombredanne avatar pombredanne commented on June 18, 2024

@tdruez excellent!
@cco3 there is no specific dependency on PostgreSQL at this stage since the latest versions of Django to support JSON fields on all supported DB backends including SQLlite.
Things are not tested yet on SQLlite but are likely to work OK
But you need to be aware that there may be issues with access contention whenever you run more than one pipeline at a time or have more than one project and also when we will start to parallelize specific pipeline steps for performance (soon enough). This will likely break SQLite because of locking so you need to keep this in mind.

from scancode.io.

pombredanne avatar pombredanne commented on June 18, 2024

@tdruez re: #56 (comment)

Edit the scancodeio/settings/base.py and locate the DATABASES setting

Would it be possible to have a local setting file that's not the main version-controlled one?
I created #58

from scancode.io.

tdruez avatar tdruez commented on June 18, 2024

@pombredanne this edit in base.py in not needed anymore, this was just a temporary workaround.
PR #57 allows to override those settings directly in the .env file.

from scancode.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.