3.0.1 defaults to SQlite, why? using docker-compose.yml

581 views
Skip to first unread message

Lin Pro

unread,
Jul 12, 2018, 8:57:10 PM7/12/18
to Mayan EDMS
Hi,
Mayan 3.0.1 installed via docker-compose.yml. No changes to the file.
After login it shows that we are using SQlite.

docker-compose.yml showing:

MAYAN_DATABASE_DRIVER: django.db.backends.postgres

Is this correct? Other files, like stack.yml is showing:
MAYAN_DATABASE_DRIVER: django.db.backends.postgresql

So the difference is postgresql and postgres
Is it a typo?

I tried both but to no avail.
Mayan 3.0.1 is informing me that:
Warning Your database backend is set to use SQLite. SQLite should only be used for development and testing, not for production.


How to change into postgres?

[root@localhost docker]# docker-compose ps
Name Command State Ports
------------------------------------------------------------------------------------------------------------
mayan-edms-app entrypoint.sh mayan Up 0.0.0.0:80->8000/tcp
mayan-edms-broker docker-entrypoint.sh rabbi ... Up (healthy) 25672/tcp, 4369/tcp, 5671/tcp, 5672/tcp
mayan-edms-db docker-entrypoint.sh postgres Up (healthy) 5432/tcp
mayan-edms-results docker-entrypoint.sh redis ... Up (healthy) 6379/tcp

[root@localhost docker]# docker-compose images
Container Repository Tag Image Id Size
---------------------------------------------------------------------------
mayan-edms-app mayanedms/mayanedms latest 4d01ee1fd5b1 1.17 GB
mayan-edms-broker healthcheck/rabbitmq latest 186def7c628e 119 MB
mayan-edms-db healthcheck/postgres latest 4d504bbed078 225 MB
mayan-edms-results healthcheck/redis latest d99d78b8980f 79.5 MB


Thanks for any info
Lin


Roberto Rosario

unread,
Jul 12, 2018, 9:01:48 PM7/12/18
to mayan...@googlegroups.com
The variable name is now MAYAN_DATABASE_ENGINE.

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lin Pro

unread,
Jul 12, 2018, 9:29:49 PM7/12/18
to Mayan EDMS
The following helped:


First issue command:
# docker-compose down

# nano docker-compose.yml and change
- MAYAN_DATABASE_DRIVER: django.db.backends.postgres
+ MAYAN_DATABASE_ENGINE: django.db.backends.postgresql

then
#docker-compose up -d

It works if set that way.


If one leaves django.db.backends.postgres an error will show up:
mayan-edms-app | django.core.exceptions.ImproperlyConfigured: 'django.db.backends.postgres' isn't an available database backend.
mayan-edms-app | Try using 'django.db.backends.XXX', where XXX is one of:
mayan-edms-app | 'mysql', 'oracle', 'postgresql', 'sqlite3'
mayan-edms-app | Error was: No module named postgres.base

I propose to change the docker-compose.yml accordingly

Lin

Roberto Rosario

unread,
Jul 12, 2018, 10:03:57 PM7/12/18
to mayan...@googlegroups.com
This was an old issues fixed a while back. Use the full database engine name: django.db.backends.postgresql and not django.db.backends.postgres

Reply all
Reply to author
Forward
0 new messages