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

Feature docker secrets #469

Closed
wants to merge 6 commits into from
Closed

Feature docker secrets #469

wants to merge 6 commits into from

Conversation

rockaut
Copy link

@rockaut rockaut commented May 31, 2019

should fix #458

Works with by checking in docker-entrypoint.sh if specified env variables are present with _FILE appended:

  • MYSQL_USER
  • MYSQL_PASSWORD
  • MYSQL_ROOT_PASSWORD
  • POSTGRES_USER
  • POSTGRES_PASSWORD

That can be done also in .env_db_mysql and so on (see examples).

In docker swarm you then set:

echo "mysqldbuser" | docker secret create MYSQL_USER -
echo "mysqldpass" | docker secret create MYSQL_PASSWORD -
echo "mysqldroot" | docker secret create MYSQL_ROOT_PASSWORD -
echo "postgresuser" | docker secret create POSTGRES_USER -
echo "postgrespass" | docker secret create POSTGRES_PASSWORD -

And refence the secrets in the stack services.

Tested on katacoda for all arches (ubuntu,centos,alpine) only error was like in #468 but those are also present in current zabbix/zabbix-server-pgsql:ubuntu-latest official builds for example.

@rockaut
Copy link
Author

rockaut commented May 31, 2019

@dotneft currently tested and PRed against 4.2 branch.
Should i also to against others? Didn't how you accept PRs - could also do separate branches for other verions (4.0, 3.2, ...)

@rockaut rockaut marked this pull request as ready for review May 31, 2019 18:04
@rockaut
Copy link
Author

rockaut commented Jun 28, 2019

@grumbens @dotneft can I do anything to make this PR more mergeable?

@dotneft
Copy link
Collaborator

dotneft commented Jul 13, 2019

Thank you! Added!

@dotneft dotneft closed this Jul 13, 2019
@rockaut rockaut deleted the features-docker-secrets branch October 11, 2019 12:50
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.

Support container secrets
2 participants