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

Make the default configuration cluster ready #28

Merged
merged 1 commit into from
Dec 14, 2017

Conversation

cimnine
Copy link
Collaborator

@cimnine cimnine commented Dec 13, 2017

This changes the default configuration to be better prepared for
usage with container management platforms, such as Docker Swarm,
Kubernetes or OpenShift.

Inspired by #27.

@cimnine cimnine changed the title Make the default configuration cluster ready WIP: Make the default configuration cluster ready Dec 13, 2017
@cimnine cimnine force-pushed the enhanced_configuration branch 13 times, most recently from 1ad7849 to 93908fa Compare December 13, 2017 16:34
@cimnine cimnine changed the title WIP: Make the default configuration cluster ready Make the default configuration cluster ready Dec 13, 2017
Copy link

@twhiston twhiston left a comment

Choose a reason for hiding this comment

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

this looks really good, also a really comprehensive readme.
One thing that is lacking is the docker image being run by non root, this will probably be an issue in openshift so that should probably be changed

README.md Outdated
* `DB_*`: Use a persistent database.
* `EMAIL_*`: Use your own mailserver.
* `MAX_PAGE_SIZE`: Use the recommended default of 1000.
* `SUBERUSER_*`: Only define those variables during the initial setup, and drop them once the DB is set up.

Choose a reason for hiding this comment

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

is SUBERUSER deliberate? or should it be superuser?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's deliberate, as those are environment variables and therefore capital by convention.

Choose a reason for hiding this comment

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

not capitalization, spelling, suBeruser

But if you rather continue to configure your application through environment variables, you may continue to use [the built-in configuration file][docker-config].
We discourage storing secrets in environment variables, as environment variable are passed on to all sub-processes and may leak easily into other systems, e.g. error collecting tools that often collect all environment variables whenever an error occurs.

Therefore we *strongly advise* to make use of the secrets mechanism provided by your container platform (i.e. [Docker Swarm secrets][swarm-secrets], [Kubernetes secrets][k8s-secrets], [OpenShift secrets][openshift-secrets]).

Choose a reason for hiding this comment

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

^ this is all good advice :D like it

@@ -31,3 +34,7 @@ volumes:
driver: local
netbox-nginx-config:
driver: local
netbox-media-files:
Copy link

@twhiston twhiston Dec 14, 2017

Choose a reason for hiding this comment

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

i cant comment on the line above, as it didnt change, but do we really want to hardcode the nginx port to 80, as that barely ever binds correctly (osx default apache or whatever)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That's only the 'container internal port'. docker-compose will bind that port to a randomish port.

@cimnine cimnine force-pushed the enhanced_configuration branch 2 times, most recently from 01f3c8c to 8c6a2be Compare December 14, 2017 11:21
@cimnine
Copy link
Collaborator Author

cimnine commented Dec 14, 2017

Good thing that there are (some) unit tests 😇

This changes the default configuration to be better prepared for
usage with container management platforms, such as Docker Swarm,
Kubernetes or OpenShift.

Closes #27.
@cimnine cimnine merged commit 7f47d17 into master Dec 14, 2017
@cimnine cimnine deleted the enhanced_configuration branch December 14, 2017 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants