From 89870ea0354ebffd80361de2860d2970659671b7 Mon Sep 17 00:00:00 2001 From: gakigaki Date: Wed, 2 Sep 2026 15:28:06 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix(docker):=20worktree=E3=81=94=E3=81=A8?= =?UTF-8?q?=E3=81=ABCompose=E7=92=B0=E5=A2=83=E3=82=92=E5=88=86=E9=9B=A2?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 8 ++++++++ docker-compose.yml | 12 ++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index 9cb710189..e68e883ed 100644 --- a/.env.example +++ b/.env.example @@ -6,6 +6,14 @@ APP_KEY= APP_DEBUG=false APP_URL=http://localhost +# Docker Compose host ports. Change these for each worktree when running multiple environments. +#WEB_PORT=8081 +#DB_FORWARD_PORT=33061 +#MAILHOG_PORT=18025 +#DUSK_DRIVER_PORT=14444 +#DUSK_VNC_PORT=15900 +#DUSK_NOVNC_PORT=17900 + LOG_CHANNEL=daily_info DB_CONNECTION=mysql diff --git a/docker-compose.yml b/docker-compose.yml index aa1d47753..04518aaa8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,5 @@ services: webapp: - container_name: webapp build: context: ./docker/webapp args: @@ -9,7 +8,7 @@ services: volumes: - .:/var/www/html/connect-cms ports: - - "80:80" + - "${WEB_PORT:-80}:80" depends_on: db: condition: service_started @@ -17,10 +16,9 @@ services: TZ: ${APP_TZ:-Asia/Tokyo} DUSK_DRIVER_URL: ${DUSK_DRIVER_URL:-http://dusk:4444/wd/hub} db: - container_name: db image: ${MYSQL_IMAGE:-mysql:8} ports: - - "3306:3306" + - "${DB_FORWARD_PORT:-3306}:3306" restart: always volumes: - ./docker/db/mysql_data:/var/lib/mysql @@ -30,15 +28,13 @@ services: MYSQL_USER: ${DB_USERNAME:-app} MYSQL_PASSWORD: ${DB_PASSWORD:-secret} MYSQL_DATABASE: ${DB_DATABASE:-connect} - MYSQL_TCP_PORT: ${DB_PORT:-3306} + MYSQL_TCP_PORT: 3306 TZ: ${APP_TZ:-Asia/Tokyo} mailhog: - container_name: mailhog image: mailhog/mailhog ports: - - "8025:8025" + - "${MAILHOG_PORT:-8025}:8025" dusk: - container_name: dusk image: selenium/standalone-chrome:latest restart: unless-stopped shm_size: 2g From e254fac7dec6c2d86ef0683c3cdb344ebf228f99 Mon Sep 17 00:00:00 2001 From: gakigaki Date: Wed, 2 Sep 2026 15:43:35 +0900 Subject: [PATCH 2/2] =?UTF-8?q?comment:=20.env.example=E3=81=ABWEB=5FPORT?= =?UTF-8?q?=E5=A4=89=E6=9B=B4=E6=99=82=E3=81=AEAPP=5FURL=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E3=81=AB=E3=81=A4=E3=81=84=E3=81=A6=E3=81=AE=E3=82=B3=E3=83=A1?= =?UTF-8?q?=E3=83=B3=E3=83=88=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.example b/.env.example index e68e883ed..1b4e2edec 100644 --- a/.env.example +++ b/.env.example @@ -7,6 +7,7 @@ APP_DEBUG=false APP_URL=http://localhost # Docker Compose host ports. Change these for each worktree when running multiple environments. +# When changing WEB_PORT, also update APP_URL above to include the same port (for example, http://localhost:8081). #WEB_PORT=8081 #DB_FORWARD_PORT=33061 #MAILHOG_PORT=18025