Closed chasseurmic closed 8 years ago
Which db are you using, and do you just need host and port?
Yeah, sorry... I'm using Postgres in a Docker container. And yes, I only need host and port. I've tried using in the fragmenta.json
file something like:
"db": "postgres://192.168.99.100:32768/fragmenta-demo_development",
but to no avail...
I've adjusted things slightly, so you can now use these keys in your config (optionally):
db_host, db_port, db_params to supply host port, and optionally some more config params to psql.
SSL is disabled by default due to localhost being the default, if you need further setup of that see the psql driver options, and put these in to the params string, which is appended to the connection string and can contain multiple options separated by spaces. You may need sslmode and friends if using tls connections. See https://godoc.org/github.com/lib/pq.
I'm afraid I haven't sorted out how best to pull updates to local copies of the CMS while in development, but if you pull a new copy you should see the change (or just adjust your local copy). The change is in this commit:
https://github.com/fragmenta/fragmenta-cms/commit/1693ff3207b534dfa0c30caebf85a83faa69ecd9
and you will need to get a newer query library as I adjusted the drivers to pass through more information:
go get -u github.com/fragmenta/query
then rebuild your app and you should be able to use new configs. Let me know how you get on.
Thank you! It works like a charm. :+1:
Thanks for the report, other feedback or ideas is welcome.
I have my DB running in a separate instance. I cannot find a way to define the connection string. It always tries to connect to localhost. Where can I find some help?