Connect to existing database
-
@murgero @girish Yes, it is possible. It can be installed on top of existing database, it just adds internal tables prefixed with _directus to your database. I've done it locally and on Stackhero.
It even supports remote database connections(that was my setup with Stackhero), and that is what I wanted to do here. Have Directus running via Cloudron on Digital Ocean and database on another host via remote access.
-
@fluxus to get this to work, you'll need to load a dump of your db tables into the directus db within cloudron. i've done it, it works, but connecting to the db manually is not trivial - you can accomplish it with CLI tools and uploading the dump file with CL interface though if you know how.
-
@doodlemania2 it's nice to hear that it can be done, thx for the info. Maybe in the future it will be added as an "out-of-the-box" option, after all it is a fundamental part of Directus.
Stackhero(which is a service similar to Cloudron I believe) has it out of the box, I got Directus running on top of external db easily.
-
-
-
-
@eddowding Directus has no feature to connect to external databases. Connecting to external databases is really app specific. For example, metabase allows connecting to external databases. The Cloudron package itself has no limitations when connecting to external databases.
The limitation we do have is that the main database of an app has to be inside Cloudron - this is by design and would make self-hosting and packaging very cumbersome if we allow users to set custom databases (For example, metabases' main database is always inside Cloudron).
-
@girish said in Connect to existing database:
@eddowding Directus has no feature to connect to external databases.
I am confused now I am aware that English is not my first language, but unless there is a difference between external and remote database connection, I am sure that Directus can connect to external/remote database.
Website hosted on server A and Directus hosted on server B, with Directus connected to database from server A.
The above is not possible with Cloudron, but it is a feature of Directus.
-
@fluxus You are right.
What I mean by 'external' is a database that is separate from the 'internal' one. By "internal", i mean, the database an app uses to store it's own data - like users, schema, meta data etc. External database is where the actual data resides.
As an example: redash/metabase have an (internal) database for authenticating users, creating dashboards etc. The actual data comes from external databases. The external databases can be mysql/postgres/redis or a multitude of the connectors they support.
-
I'm coming back to this because I'm still confused.
I have a remotely hosted database. I want to build an admin on top of that. That database must continue to be remotely hosted.
Can I build that admin using Directus on Cloudron?
If so, any pointers would be appreciated.
Thank you!