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

Update portainer secret documentation #418

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions services/portainer/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ ${TEMP_COMPOSE}-aws: docker-compose.yml docker-compose.aws.yml docker-compose.le
@${REPO_BASE_DIR}/scripts/docker-compose-config.bash -e .env $< docker-compose.aws.yml docker-compose.letsencrypt.dns.yml > $@

.PHONY: secrets
secrets: .env ## Construct secrets for portainer pwd, to change pwd it need to be done manually :https://documentation.portainer.io/v2.0/users/reset-admin/
secrets: .env ## Construct secrets for portainer pwd, to change pwd it need to be done manually https://git.speag.com/oSparc/osparc-ops-deployment-configuration/-/wikis/Update-Portainer-Password
@if [ -z $(IS_PORTAINER_SERVICE_RUNNING) ]; then\
echo "Updating secret portainer_admin_password" && docker secret rm portainer_admin_password 2>/dev/null; set -o allexport; source .env; set +o allexport; echo -n "$${PORTAINER_ADMIN_PWD}" | docker secret create portainer_admin_password - 2>/dev/null; \
echo "Setting portainer_admin_password (can only set but not update password!)" \
&& docker secret rm portainer_admin_password 2>/dev/null; \
set -o allexport; source .env; set +o allexport; \
echo -n "$${PORTAINER_ADMIN_PWD}" | docker secret create portainer_admin_password - 2>/dev/null; \
fi