From abe9ef207761e5577e9464d9db6ca03aeb8afa09 Mon Sep 17 00:00:00 2001 From: Nave-wata <90523045+Nave-wata@users.noreply.github.com> Date: Thu, 28 Sep 2023 00:46:04 +0900 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=96=8B=E7=99=BA=E7=92=B0=E5=A2=83?= =?UTF-8?q?=E3=81=ABnginx=E3=82=B3=E3=83=B3=E3=83=86=E3=83=8A=E3=82=92?= =?UTF-8?q?=E5=B0=8E=E5=85=A5=E3=83=BBphp=20artisan=20serve=20=E3=82=B3?= =?UTF-8?q?=E3=83=9E=E3=83=B3=E3=83=89=E3=81=A7=E3=81=AE=E9=96=8B=E7=99=BA?= =?UTF-8?q?=E9=AF=96=E3=82=92=E8=B5=B7=E5=8B=95=E3=81=97=E3=81=AA=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- compose.yml | 15 ++++++++++-- docker/app/Dockerfile | 2 ++ docker/app/bin/containerStart.sh | 8 +------ docker/app/php/www.conf | 15 ++++++++++++ docker/nginx/Dockerfile | 6 +++++ docker/nginx/conf.d/default.conf | 39 ++++++++++++++++++++++++++++++++ 6 files changed, 76 insertions(+), 9 deletions(-) create mode 100644 docker/app/php/www.conf create mode 100644 docker/nginx/Dockerfile create mode 100644 docker/nginx/conf.d/default.conf diff --git a/compose.yml b/compose.yml index 709316ef..51423674 100644 --- a/compose.yml +++ b/compose.yml @@ -1,7 +1,19 @@ version: "3.8" services: + hira-chan_nginx: + image: hira-chan:nginx-1.0.0 + container_name: hira-chan_nginx + build: + context: . + dockerfile: ./docker/nginx/Dockerfile + ports: + - 80:80 + depends_on: + - hira-chan_app + tty: true + hira-chan_app: - image: hira-chan:app-2.0.0 + image: hira-chan:app-2.1.0 container_name: hira-chan_app build: context: . @@ -10,7 +22,6 @@ services: volumes: - .:/usr/src/app ports: - - 80:80 - 5173:5173 depends_on: - hira-chan_echo-server diff --git a/docker/app/Dockerfile b/docker/app/Dockerfile index ff390085..1628033f 100644 --- a/docker/app/Dockerfile +++ b/docker/app/Dockerfile @@ -26,6 +26,7 @@ RUN \ unzip \ wget \ zlib1g-dev \ + php-fpm \ php-ctype \ php-curl \ php-dom \ @@ -65,6 +66,7 @@ COPY --from=composer:2.5.5 /usr/bin/composer /usr/bin/composer # 設定ファイルをコピー COPY ./docker/app/php/php.ini /etc/php/8.1/cli/php.ini +COPY ./docker/app/php/www.conf /etc/php/8.1/fpm/pool.d/www.conf COPY ./docker/app/postfix/main.cf /etc/postfix/main.cf # コンテナ作成時に実行するスクリプトをコピー diff --git a/docker/app/bin/containerStart.sh b/docker/app/bin/containerStart.sh index 75321b65..85cad849 100644 --- a/docker/app/bin/containerStart.sh +++ b/docker/app/bin/containerStart.sh @@ -25,6 +25,7 @@ fi # 各種サービス起動 sudo su <