From e4b90322ff3729ae544c1dd04279ad5d6cf8d840 Mon Sep 17 00:00:00 2001 From: UNILORN Date: Tue, 30 Apr 2024 10:33:29 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Unless=20the=20user?= =?UTF-8?q?=20is=20root,the=20swoole=20server=20cannot=20start=20on=20port?= =?UTF-8?q?=2080,=20so=20change=20it=20to=20port=208000.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Swoole.Dockerfile | 2 +- deployment/octane/Swoole/supervisord.swoole.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Swoole.Dockerfile b/Swoole.Dockerfile index 4152a21..24cca7d 100644 --- a/Swoole.Dockerfile +++ b/Swoole.Dockerfile @@ -156,7 +156,7 @@ RUN chmod +x /usr/local/bin/start-container RUN cat deployment/utilities.sh >> ~/.bashrc -EXPOSE 80 +EXPOSE 8000 ENTRYPOINT ["start-container"] diff --git a/deployment/octane/Swoole/supervisord.swoole.conf b/deployment/octane/Swoole/supervisord.swoole.conf index e12790a..2d00f51 100644 --- a/deployment/octane/Swoole/supervisord.swoole.conf +++ b/deployment/octane/Swoole/supervisord.swoole.conf @@ -6,7 +6,7 @@ pidfile=/var/run/supervisord.pid [program:octane] process_name=%(program_name)s_%(process_num)02d -command=php %(ENV_ROOT)s/artisan octane:start --server=swoole --host=0.0.0.0 --port=80 +command=php %(ENV_ROOT)s/artisan octane:start --server=swoole --host=0.0.0.0 --port=8000 user=%(ENV_USER)s autostart=true autorestart=true From 5aa0a38ce61a2267a7d063706e5f205fae41429e Mon Sep 17 00:00:00 2001 From: mortexa Date: Tue, 30 Apr 2024 23:33:58 +0330 Subject: [PATCH 2/2] wip --- .github/workflows/frankenphp-test.yml | 4 ++-- .github/workflows/roadrunner-test.yml | 4 ++-- .github/workflows/swoole-test.yml | 4 ++-- FrankenPHP.Dockerfile | 2 +- README.md | 8 ++++---- RoadRunner.Dockerfile | 2 +- deployment/octane/FrankenPHP/supervisord.frankenphp.conf | 2 +- deployment/octane/RoadRunner/supervisord.roadrunner.conf | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/frankenphp-test.yml b/.github/workflows/frankenphp-test.yml index aa075ff..78e0b0f 100644 --- a/.github/workflows/frankenphp-test.yml +++ b/.github/workflows/frankenphp-test.yml @@ -63,11 +63,11 @@ jobs: working-directory: /var/www/app - name: Run the Docker container - run: docker run -d --rm -p 80:80 app:local + run: docker run -d --rm -p 8000:8000 app:local working-directory: /var/www/app - name: Wait for the container run: sleep 10s - name: Check application health - run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost + run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost:8000 diff --git a/.github/workflows/roadrunner-test.yml b/.github/workflows/roadrunner-test.yml index 68b8875..10b5e98 100644 --- a/.github/workflows/roadrunner-test.yml +++ b/.github/workflows/roadrunner-test.yml @@ -63,11 +63,11 @@ jobs: working-directory: /var/www/app - name: Run the Docker container - run: docker run -d --rm -p 80:80 app:local + run: docker run -d --rm -p 8000:8000 app:local working-directory: /var/www/app - name: Wait for the container run: sleep 10s - name: Check application health - run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost + run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost:8000 diff --git a/.github/workflows/swoole-test.yml b/.github/workflows/swoole-test.yml index 1dd1aa7..ce77828 100644 --- a/.github/workflows/swoole-test.yml +++ b/.github/workflows/swoole-test.yml @@ -63,11 +63,11 @@ jobs: working-directory: /var/www/app - name: Run the Docker container - run: docker run -d --rm -p 80:80 app:local + run: docker run -d --rm -p 8000:8000 app:local working-directory: /var/www/app - name: Wait for the container run: sleep 10s - name: Check application health - run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost + run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost:8000 diff --git a/FrankenPHP.Dockerfile b/FrankenPHP.Dockerfile index 17c5553..774dceb 100644 --- a/FrankenPHP.Dockerfile +++ b/FrankenPHP.Dockerfile @@ -163,7 +163,7 @@ RUN chmod +x /usr/local/bin/start-container RUN cat deployment/utilities.sh >> ~/.bashrc -EXPOSE 80 +EXPOSE 8000 EXPOSE 443 EXPOSE 443/udp EXPOSE 2019 diff --git a/README.md b/README.md index 0adef93..4072554 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ docker build -t : -f .Dockerfile . ```bash # HTTP mode -docker run -p :80 --rm : +docker run -p :8000 --rm : # Horizon mode docker run -e CONTAINER_MODE=horizon --rm : @@ -52,13 +52,13 @@ docker run -e CONTAINER_MODE=horizon --rm : docker run -e CONTAINER_MODE=scheduler --rm : # HTTP mode with Horizon -docker run -e WITH_HORIZON=true -p :80 --rm : +docker run -e WITH_HORIZON=true -p :8000 --rm : # HTTP mode with Scheduler -docker run -e WITH_SCHEDULER=true -p :80 --rm : +docker run -e WITH_SCHEDULER=true -p :8000 --rm : # HTTP mode with Scheduler and Horizon -docker run -e WITH_SCHEDULER=true -e WITH_HORIZON=true -p :80 --rm : +docker run -e WITH_SCHEDULER=true -e WITH_HORIZON=true -p :8000 --rm : # Worker mode docker run -e CONTAINER_MODE=worker -e WORKER_COMMAND="php /var/www/html/artisan foo:bar" --rm : diff --git a/RoadRunner.Dockerfile b/RoadRunner.Dockerfile index c7f2fa3..81f9ef3 100644 --- a/RoadRunner.Dockerfile +++ b/RoadRunner.Dockerfile @@ -161,7 +161,7 @@ RUN chmod +x rr /usr/local/bin/start-container RUN cat deployment/utilities.sh >> ~/.bashrc -EXPOSE 80 +EXPOSE 8000 EXPOSE 6001 ENTRYPOINT ["start-container"] diff --git a/deployment/octane/FrankenPHP/supervisord.frankenphp.conf b/deployment/octane/FrankenPHP/supervisord.frankenphp.conf index ba3926c..f4a4502 100644 --- a/deployment/octane/FrankenPHP/supervisord.frankenphp.conf +++ b/deployment/octane/FrankenPHP/supervisord.frankenphp.conf @@ -6,7 +6,7 @@ pidfile=/var/run/supervisord.pid [program:octane] process_name=%(program_name)s_%(process_num)02d -command=php %(ENV_ROOT)s/artisan octane:start --server=frankenphp --host=0.0.0.0 --port=80 --admin-port=2019 +command=php %(ENV_ROOT)s/artisan octane:start --server=frankenphp --host=0.0.0.0 --port=8000 --admin-port=2019 # command=php %(ENV_ROOT)s/artisan octane:start --server=frankenphp --host=localhost --port=443 --admin-port=2019 --https --http-redirect user=%(ENV_USER)s autostart=true diff --git a/deployment/octane/RoadRunner/supervisord.roadrunner.conf b/deployment/octane/RoadRunner/supervisord.roadrunner.conf index b494f31..160be06 100644 --- a/deployment/octane/RoadRunner/supervisord.roadrunner.conf +++ b/deployment/octane/RoadRunner/supervisord.roadrunner.conf @@ -6,7 +6,7 @@ pidfile=/var/run/supervisord.pid [program:octane] process_name=%(program_name)s_%(process_num)02d -command=php %(ENV_ROOT)s/artisan octane:start --server=roadrunner --host=0.0.0.0 --port=80 --rpc-port=6001 --rr-config=%(ENV_ROOT)s/.rr.yaml +command=php %(ENV_ROOT)s/artisan octane:start --server=roadrunner --host=0.0.0.0 --port=8000 --rpc-port=6001 --rr-config=%(ENV_ROOT)s/.rr.yaml user=%(ENV_USER)s autostart=true autorestart=true