Doveps / mono

Code for Doveps projects
http://doveps.com
MIT License
0 stars 0 forks source link

02-27-2018 Report #112

Closed JosiahRegencia closed 6 years ago

JosiahRegencia commented 6 years ago

Read: https://dantehranian.wordpress.com/2015/03/25/how-should-i-get-application-configuration-into-my-docker-containers/ and https://stackify.com/config-values-docker-containers-environment-variables/

Thought probably the best way to do it is through environment variables. Saw http://winstonkotzan.com/blog/2017/06/01/connecting-to-external-postgres-database-with-docker.html

Added

https://github.com/Doveps/mono/blob/5dd39f388dc6981ea951ee33d0a86cd453d4b53e/docker-compose.yml#L9

based on the link above. Easiest envinronment variables I could find. Tried to run the curl screenshot from 2018-02-27 22 57 14

I think a part of that has something to do with savant already running even though the mono_db_1 container hasn't finished starting yet.

Currently looking into .env files.

greenmoss commented 6 years ago

I think the DATABASE_URL would actually need to go on the savant container. For instance around here:

https://github.com/Doveps/mono/blob/5dd39f388dc6981ea951ee33d0a86cd453d4b53e/docker-compose.yml#L18

Also note that the winstonkotzan link includes overriding postgres "trust" by editing pg_hba.conf, but we are ok with using user/password authentication.