Skip to content

initialize WARDEN_DOCKER_SOCK variable in front controller#908

Open
magicaner wants to merge 1 commit into
wardenenv:mainfrom
magicaner:fix-sign-certificate-command
Open

initialize WARDEN_DOCKER_SOCK variable in front controller#908
magicaner wants to merge 1 commit into
wardenenv:mainfrom
magicaner:fix-sign-certificate-command

Conversation

@magicaner

Copy link
Copy Markdown

Check List

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds support for Docker Compose --env-file when warden sign-certificate checks for the running traefik service, ensuring global .env settings are honored (fixes #907).

Changes:

  • Update the Docker Compose invocation in sign-certificate to pass --env-file="${WARDEN_HOME_DIR}/.env" when running ps -q traefik.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread commands/sign-certificate.cmd Outdated
-out "${WARDEN_SSL_DIR}/certs/${CERTIFICATE_NAME}.crt.pem"

if [[ "$(cd "${WARDEN_HOME_DIR}" && ${DOCKER_COMPOSE_COMMAND} -p warden -f "${WARDEN_DIR}/docker/docker-compose.yml" ps -q traefik)" ]]
if [[ "$(cd "${WARDEN_HOME_DIR}" && ${DOCKER_COMPOSE_COMMAND} -p warden --env-file="${WARDEN_HOME_DIR}/.env" -f "${WARDEN_DIR}/docker/docker-compose.yml" ps -q traefik)" ]]

Copilot AI Jan 30, 2026

Copy link

Choose a reason for hiding this comment

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

PR template checklist indicates CHANGELOG.md entry is still missing. Since this is a user-facing bug fix (sign-certificate now honors the global .env), please add a short entry under the UNRELEASED -> Bug Fixes section of CHANGELOG.md before merging.

Suggested change
if [[ "$(cd "${WARDEN_HOME_DIR}" && ${DOCKER_COMPOSE_COMMAND} -p warden --env-file="${WARDEN_HOME_DIR}/.env" -f "${WARDEN_DIR}/docker/docker-compose.yml" ps -q traefik)" ]]
if [[ "$(cd "${WARDEN_HOME_DIR}" && ${DOCKER_COMPOSE_COMMAND} -p warden --env-file="${WARDEN_DIR}/.env" -f "${WARDEN_DIR}/docker/docker-compose.yml" ps -q traefik)" ]]

Copilot uses AI. Check for mistakes.
if [[ "$(cd "${WARDEN_HOME_DIR}" && ${DOCKER_COMPOSE_COMMAND} -p warden --env-file="${WARDEN_HOME_DIR}/.env" -f "${WARDEN_DIR}/docker/docker-compose.yml" ps -q traefik)" ]]
then
echo "==> Updating traefik"
"$WARDEN_BIN" svc up traefik

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@magicaner Would these calls not fall victim to the same issue? In fact wouldn't all calls to warden that pass through to docker have this issue? Seems odd that this one command is a problem when others wouldn't.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I have moved WARDEN_DOCKER_SOCK initialization to front controller, please check

@magicaner magicaner force-pushed the fix-sign-certificate-command branch from 34f70a5 to 91eb211 Compare January 31, 2026 12:40
@magicaner magicaner changed the title add --env-file option to warden docker-compose call initialize WARDEN_DOCKER_SOCK variable in front controller Feb 2, 2026
@magicaner magicaner requested a review from bap14 February 2, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants