initialize WARDEN_DOCKER_SOCK variable in front controller#908
initialize WARDEN_DOCKER_SOCK variable in front controller#908magicaner wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
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-certificateto pass--env-file="${WARDEN_HOME_DIR}/.env"when runningps -q traefik.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| -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)" ]] |
There was a problem hiding this comment.
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.
| 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)" ]] |
| 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 |
There was a problem hiding this comment.
@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.
There was a problem hiding this comment.
I have moved WARDEN_DOCKER_SOCK initialization to front controller, please check
34f70a5 to
91eb211
Compare
Check List