We use Heroku as our hosting platform. While Heroku does support the use of docker containers, it does not (seemingly) allow for postgres container images; instead it uses their own postgres add-on. This add-on provides a custom URL that can be referenced via an environment variable. However, I cannot locate any config in the datalore web image that I could modify to point to the heroku hosted postgres add-on. I have successfully deployed the datalore web image to heroku but cannot figure out how to get it to talk to the heroku postgres instance. How can I modify database URL connections for the datalore postgres instance (essentially replace the postgres docker image with the a connection to the heroku postgres add-on image)?
Hi @smcgarry_hs,
it does not (seemingly) allow for postgres container images
Hmm, I didn’t find any information regarding such a restriction, so I do believe it should be possible to run Postgres in a container as usual.
Anyway, it is also possible to use external database in Datalore, you need to remove postgresql
container completely from the configuration file and specify additional database parameters in the environment
section:
DB_USER: "[database_user]"
to specify the database userDB_URL: "jdbc:postgresql://[database_host]:[database_port]/[database_name]"
to specify the database URL
Hope this helps!
Best regards,
Igor Medovolkin
QA Engineer in Datalore
Forgot to mention postgresql-data
volume – it should be removed in case of external database. You may also remove datalore-backend-network
network if you are not going to use JetBrains Hub in your installation.
Hi Igor - if it IS possible to deploy to Heroku using the postgres image in the docker container, I’d prefer that. Do you have any documentation handy for getting DataLore deployed to heroku? When I try to deploy, I can get the web app deployed ok but the db image doesn’t seem to actually start up so I’m not sure what to do.
Hi! It seems, postgres is not the main issue - there are other restrictions on the Heroku side, also it seems impossible to mount docker.sock there, so for example Datalore won’t be able to spawn computational agents.
In general, Heroku is not officially supported by Datalore, so we can’t guarantee that it will work there and we can’t provide a proper support for this platform.