[Mayan EDMS: 2578] 3.0.1 defaults to SQlite, why? using docker-compose.yml

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 2578] 3.0.1 defaults to SQlite, why? using docker-compose.yml

Lin Pro
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


--

---
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 2578] 3.0.1 defaults to SQlite, why? using docker-compose.yml

rosarior
Administrator
The variable name is now MAYAN_DATABASE_ENGINE.

On Thu, Jul 12, 2018, 8:57 PM Lin Pro <[hidden email]> wrote:
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


--

---
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.

--

---
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 2584] 3.0.1 defaults to SQlite, why? using docker-compose.yml

Lin Pro
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



--

---
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [Mayan EDMS: 2584] 3.0.1 defaults to SQlite, why? using docker-compose.yml

rosarior
Administrator
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

On Thu, Jul 12, 2018, 9:29 PM Lin Pro <[hidden email]> wrote:
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



--

---
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.

--

---
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.