Add instructions for running with postgresql locally (and production?) in dev docs
See original GitHub issueI don’t think there are instructions on how to set up Kolibri to use Postgres as an alternative DB. Here’s what @lyw07 shared with me on how to do it:
- Install postgresql (
brew install postgresql
if you have mac + homebrew) - install psycopg2-binary from pip (
pip install psycog2-binary
) - set env var
KOLIBRI_DATABASE_ENGINE
to postgres - set other env vars
KOLIBRI_DATABASE_NAME
,KOLIBRI_DATABASE_PASSWORD
,KOLIBRI_DATABASE_USER
,KOLIBRI_DATABASE_HOST
, andKOLIBRI_DATABASE_PORT
Example .env
file
KOLIBRI_DATABASE_ENGINE = postgres
KOLIBRI_DATABASE_NAME = postgres
KOLIBRI_DATABASE_PASSWORD = postgres
KOLIBRI_DATABASE_USER = [shell username]
KOLIBRI_DATABASE_HOST = 127.0.0.1
KOLIBRI_DATABASE_PORT = 5432
May also need to delete ~/.kolibri/.data_version
if already started server with sqlite.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
15: 19.3. Starting the Database Server - PostgreSQL
For FreeBSD, look at the file contrib/start-scripts/freebsd in the PostgreSQL source distribution. · On OpenBSD, add the following lines to the file /etc/rc....
Read more >Installing and Using PostgreSQL Locally - Codecademy
You've installed, run, and connected to Postgres! We achieved this by setting up a Postgres server and client locally. Now you have the...
Read more >Set Up a PostgreSQL Database on Windows - Micro Focus
Download and install a PostgreSQL server. · Add the PostgreSQL bin directory path to the PATH environmental variable. · Open the psql command-line...
Read more >Creating a PostgreSQL DB instance and connecting to a ...
Create a DB instance running the PostgreSQL database engine. ... and use pgAdmin without having a local instance of PostgreSQL on your client...
Read more >Environments and deployments - GitLab Docs
Documentation for GitLab Community Edition, GitLab Enterprise Edition, ... Static environments have static names, like staging or production .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
lol I used
psycopg2
because I could not find inpsycog2-binary
in pip. The reason was I copied and pasted from your comment and there’s a missingp
in the package name. If you fix it, it’s fine as installing the binary avoids the compilation phase in pipThis PR by @bjester https://github.com/learningequality/kolibri/pull/9556 added some make commands to make this easier, but instructions would finalize this issue!