From d962af344b68fbf3527e8c2cc599abf64acf6ee2 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Thu, 27 Nov 2025 12:55:11 +0100 Subject: [PATCH 1/3] Rename Traefik enyrypoints to web/websecure --- traefik/traefik.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/traefik/traefik.yml b/traefik/traefik.yml index b8ff017..f51c7ef 100644 --- a/traefik/traefik.yml +++ b/traefik/traefik.yml @@ -5,9 +5,9 @@ api: disableDashboardAd: true entryPoints: - http: + web: address: ":80" - https: + websecure: address: ":443" http: tls: {} From 1e8842704e6e5cb31f1335d2c25ebc3c63edffe9 Mon Sep 17 00:00:00 2001 From: turegjorup Date: Thu, 27 Nov 2025 13:25:06 +0100 Subject: [PATCH 2/3] Add traefik:pull and traefik:logs command --- scripts/itkdev-docker-compose | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/scripts/itkdev-docker-compose b/scripts/itkdev-docker-compose index 679e357..ea72098 100755 --- a/scripts/itkdev-docker-compose +++ b/scripts/itkdev-docker-compose @@ -41,7 +41,7 @@ function self_update { git checkout "$branch" git pull - echo "${bold}Done.${normal}" + echo "${bold}Done. Please run traefik:pull to ensure you have the latest containers.${normal}" echo echo "Latest changes:" @@ -264,16 +264,22 @@ Commands: Update template installed in project. traefik:start - Start træfik reverse proxy. + Start traefik reverse proxy. traefik:stop - Stop træfik reverse proxy + Stop traefik reverse proxy traefik:url - URL for the administrative UI for træfik. + URL for the administrative UI for traefik. traefik:open - Open the administrative UI for træfik. + Open the administrative UI for traefik. + + traefik:logs + See traefik logs + + traefik:pull + Pull latest traefik & socket-proxy containers mail:url URL for the test mail web interface. @@ -474,6 +480,12 @@ if [[ "$#" -gt "0" && "$1" == "traefik:stop" ]]; then exit fi +# Allow traefik:pull without existence of .env +if [[ "$#" -gt "0" && "$1" == "traefik:pull" ]]; then + $(cd ${script_dir}/../traefik/; docker compose pull) + exit +fi + # Allow dory:start without existence of .env if [[ "$#" -gt "0" && "$1" == "dory:start" ]]; then if [ "$(docker inspect -f '{{.State.Running}}' traefik 2>/dev/null)" == "true" ]; then @@ -728,6 +740,11 @@ EOF echo http://${url}:8080; ;; + traefik:logs) + echo "docker logs --tail 20 traefik" + docker logs --tail 20 traefik + ;; + mail:url) url="http://${COMPOSE_DOMAIN}:$(docker_compose port mail 8025 | cut -d: -f2)" echo $url From 3a53c3fb73bfb4282f703d6a7be962eeb64c742f Mon Sep 17 00:00:00 2001 From: turegjorup Date: Thu, 27 Nov 2025 13:34:54 +0100 Subject: [PATCH 3/3] Remove Dory reverse proxy references --- .../itkdev-docker-compose-completion.bash | 2 +- completion/zsh/_itkdev-docker-compose | 2 -- scripts/itkdev-docker-compose | 29 +------------------ 3 files changed, 2 insertions(+), 31 deletions(-) diff --git a/completion/bash/itkdev-docker-compose-completion.bash b/completion/bash/itkdev-docker-compose-completion.bash index 0fb27d4..0b52a60 100644 --- a/completion/bash/itkdev-docker-compose-completion.bash +++ b/completion/bash/itkdev-docker-compose-completion.bash @@ -9,7 +9,7 @@ _idc_completions() fi # Keep the suggestions in a local variable - local suggestions=($(compgen -W "dory:start dory:stop url open drush nfs:enable template:install template:update traefik:start traefik:stop traefik:open traefik:url mail:open mail:url mailhog:open mailhog:url sql:cli sql:connect sql:log sql:port sql:open xdebug xdebug3 hosts:insert self:update sync sync:db sync:files images:pull composer php version bin/console" -- "${COMP_WORDS[1]}")) + local suggestions=($(compgen -W "url open drush nfs:enable template:install template:update traefik:start traefik:stop traefik:open traefik:url mail:open mail:url mailhog:open mailhog:url sql:cli sql:connect sql:log sql:port sql:open xdebug xdebug3 hosts:insert self:update sync sync:db sync:files images:pull composer php version bin/console" -- "${COMP_WORDS[1]}")) COMPREPLY=("${suggestions[@]}") diff --git a/completion/zsh/_itkdev-docker-compose b/completion/zsh/_itkdev-docker-compose index 9a15bfe..78cc251 100644 --- a/completion/zsh/_itkdev-docker-compose +++ b/completion/zsh/_itkdev-docker-compose @@ -27,8 +27,6 @@ _itkdev-docker-compose() { case $state in (command) _values 'itkdev-docker-compose command' \ - 'dory\:start[Start reverse proxy]' \ - 'dory\:stop[Stop reverse proxy]' \ 'url[Print url to site.]' \ 'open[Open url in default browser.]' \ 'drush[Run drush command.]' \ diff --git a/scripts/itkdev-docker-compose b/scripts/itkdev-docker-compose index ea72098..1f12e4b 100755 --- a/scripts/itkdev-docker-compose +++ b/scripts/itkdev-docker-compose @@ -187,12 +187,6 @@ Usage: itkdev-docker-compose command [command arguments] Commands: - dory:start - Start dory reverse proxy - - dory:stop - Stop dory reverse proxy - url [service [port]] Print url to site or a service @@ -465,10 +459,6 @@ fi # Allow traefik:start without existence of .env if [[ "$#" -gt "0" && "$1" == "traefik:start" ]]; then - if [ "$(docker inspect -f '{{.State.Running}}' dory_dnsmasq 2>/dev/null)" == "true" ]; then - (>&2 echo "${bold}Dory reverse proxy should be stopped first. Run itkdev-docker-compose dory:stop.${normal}") - exit 22; - fi docker network inspect frontend >/dev/null 2>&1 || docker network create --driver=bridge --attachable --internal=false frontend $(cd ${script_dir}/../traefik/; docker compose up -d) exit @@ -486,22 +476,6 @@ if [[ "$#" -gt "0" && "$1" == "traefik:pull" ]]; then exit fi -# Allow dory:start without existence of .env -if [[ "$#" -gt "0" && "$1" == "dory:start" ]]; then - if [ "$(docker inspect -f '{{.State.Running}}' traefik 2>/dev/null)" == "true" ]; then - (>&2 echo "${bold}Traefik reverse proxy should be stopped first. Run itkdev-docker-compose traefik:stop.${normal}") - exit 22; - fi - dory up - exit -fi - -# Allow dory:start without existence of .env -if [[ "$#" -gt "0" && "$1" == "dory:stop" ]]; then - dory down - exit -fi - # Allow version without existence of compose file. if [[ "$#" -gt "0" && "$1" == "version" ]]; then echo Version: ${VERSION} @@ -560,10 +534,9 @@ fi # Check if revers proxy is running and print warning if not. set +o errexit is_treafik_running=$(docker inspect -f '{{.State.Running}}' traefik 2>/dev/null) -is_dory_running=$(docker inspect -f '{{.State.Running}}' dory_dnsmasq 2>/dev/null) set -o errexit -if [ ! "$is_treafik_running" == "true" ] && [ ! "$is_dory_running" == "true" ]; then +if [ ! "$is_treafik_running" == "true" ]; then (>&2 echo "${bold}Reverse proxy has not been started. Hostname will not be resolved to containers and not all commands will work correctly.${normal}") fi