Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/docker instructions #124

Merged
merged 5 commits into from
Nov 20, 2020
Merged

Conversation

uritau
Copy link
Contributor

@uritau uritau commented Nov 14, 2020

Purpose

This PR wants to solve some issues detected following the instructions in readme about Terraboard deployment using Docker (and docker-compose).

Detected issues

Error launching postgres container

waiting for server to start....postgres: invalid argument: "listen_addresses="
Try "postgres --help" for more information.
 stopped waiting
pg_ctl: could not start server
Examine the log output.

I think that this first issue could be related with this PR Remove deprecated links, use compose default network. The -d parameter in docker run should be for docker itself, not for postgres daemon, so let's move before the container call.
Trying to make the code a little bit more readable I suggest to use the long description --detach instead the short one -d.

Error launching terraboard container:

level=fatal msg="pq: SSL is not enabled on the server"

As far as adding SSL in the pgsql is not a trivial think I think that we can use DB_SSLMODE="disable" in docker and docker-compose. This issue is related with the one that @gssajith reports in PR #109. I think that the solution offered there it's better and more secure, but for "testing and development" purposes I think that disabling SSLMODE it's not a big problem.

Other comments

On top of that issues, I think that the proposed docker solution and the docker-compose are not enough similar, and that's the reason why I think that it's better to separate their Readme explanation. In future PRs I will try to reduce these diferences. If you agree with me, of course.

If you agree on merging this PR, the "Launch with Docker" information in https://camptocamp.github.io/terraboard/ will require an update too :)

Again, thanks for your effort!

@coveralls
Copy link

coveralls commented Nov 14, 2020

Coverage Status

Coverage remained the same at 15.541% when pulling c1df224 on uritau:fix/docker-instructions into cec421d on camptocamp:master.

README.md Outdated
@@ -167,7 +201,7 @@ contains a Terraboard template to automate its installation in Cattle.
## Authentication and base URL

Terraboard does not implement authentication. Instead, it is recommended to use
an authentication proxy such as [oauth2_proxy](https://github.com/bitly/oauth2_proxy).
an authentication proxy such as [oauth2_proxy](https://github.com/camptocamp/oauth2_proxy).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be fair, I think it's the docker-compose.yml which should be patched instead. We don't maintain oauth2_proxy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK! Sorry for my mistake.
What do you think about the new proposal? Deleting the oauth proxy?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated the docker-compose for 4 reasons:

  • To remove the oauth2_proxy.
  • To Simplify the bootstrap of the project (reducing the number of necessary variables).
  • To make it listen to port 8080 instead of 80.
  • To avoid ssl issues with postgres.

@uritau uritau force-pushed the fix/docker-instructions branch 2 times, most recently from 940d2b3 to 5d8a446 Compare November 17, 2020 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants