self-hosted icon indicating copy to clipboard operation
self-hosted copied to clipboard

Supported database servers

Open mechanarchy opened this issue 3 years ago • 2 comments
trafficstars

The official docs only mention MySQL as a database storage engine. Mo has also hinted that AWS RDS is a suitable target:

The account will be created on a MySQL database initialized by the Docker instance. You can specify an external database (such as AWS RDB) by editing your .env file. Originally posted by @moughxyz in https://github.com/standardnotes/standalone/issues/47#issuecomment-922925855

In my case, I am already running a PostgreSQL server in my stack and would prefer to consolidate Standard Notes onto that, if it is supported or even just "unsupported but shouldn't break". It would also be nice to have a couple of extra sentences on the official docs link above mentioning other common database technologies (even if they're unsupported) for clarity.

What is the status of other DB backends with Standard Notes?

mechanarchy avatar Feb 18 '22 01:02 mechanarchy

We haven't tested any other DBs so we can't really say anything in our docs about them. But if you do test it out let us know how it works out and we can build on that.

moughxyz avatar Feb 18 '22 13:02 moughxyz

I did a brief look through the code and unfortunately in its current state I'm not able to try it out, as the database connection type is hard-coded to mysql. Can you please expose an environment variable for these?

https://github.com/standardnotes/syncing-server-js/blob/288bec995672123a68799943fcfada27864284bd/src/Bootstrap/Container.ts#L75-L76

https://github.com/standardnotes/auth/blob/60db98c90910a33e0dfe0ed30303a4fe5dfb708e/src/Bootstrap/Container.ts#L143-L144


Ah, don't bother. There are hard-coded migrations which use non-portable MySQL specific syntax: https://github.com/standardnotes/auth/blob/60db98c90910a33e0dfe0ed30303a4fe5dfb708e/migrations/1606470249553-init_database.ts#L6-L8

Evidently the project will be locked to MySQL for some time yet.

mechanarchy avatar Feb 21 '22 09:02 mechanarchy