Skip to content

Commit 860a6fb

Browse files
UNILORNsmortexa
andauthored
Start HTTP server on port 8000 (#73)
* 🐛 fix: Unless the user is root,the swoole server cannot start on port 80, so change it to port 8000. * wip --------- Co-authored-by: mortexa <[email protected]>
1 parent 5ad9113 commit 860a6fb

File tree

10 files changed

+16
-16
lines changed

10 files changed

+16
-16
lines changed

.github/workflows/frankenphp-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ jobs:
6363
working-directory: /var/www/app
6464

6565
- name: Run the Docker container
66-
run: docker run -d --rm -p 80:80 app:local
66+
run: docker run -d --rm -p 8000:8000 app:local
6767
working-directory: /var/www/app
6868

6969
- name: Wait for the container
7070
run: sleep 10s
7171

7272
- name: Check application health
73-
run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost
73+
run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost:8000

.github/workflows/roadrunner-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ jobs:
6363
working-directory: /var/www/app
6464

6565
- name: Run the Docker container
66-
run: docker run -d --rm -p 80:80 app:local
66+
run: docker run -d --rm -p 8000:8000 app:local
6767
working-directory: /var/www/app
6868

6969
- name: Wait for the container
7070
run: sleep 10s
7171

7272
- name: Check application health
73-
run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost
73+
run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost:8000

.github/workflows/swoole-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ jobs:
6363
working-directory: /var/www/app
6464

6565
- name: Run the Docker container
66-
run: docker run -d --rm -p 80:80 app:local
66+
run: docker run -d --rm -p 8000:8000 app:local
6767
working-directory: /var/www/app
6868

6969
- name: Wait for the container
7070
run: sleep 10s
7171

7272
- name: Check application health
73-
run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost
73+
run: curl -f -s -o /dev/null -w "%{http_code}" http://localhost:8000

FrankenPHP.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ RUN chmod +x /usr/local/bin/start-container
163163

164164
RUN cat deployment/utilities.sh >> ~/.bashrc
165165

166-
EXPOSE 80
166+
EXPOSE 8000
167167
EXPOSE 443
168168
EXPOSE 443/udp
169169
EXPOSE 2019

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ docker build -t <image-name>:<tag> -f <your-octane-driver>.Dockerfile .
4343

4444
```bash
4545
# HTTP mode
46-
docker run -p <port>:80 --rm <image-name>:<tag>
46+
docker run -p <port>:8000 --rm <image-name>:<tag>
4747

4848
# Horizon mode
4949
docker run -e CONTAINER_MODE=horizon --rm <image-name>:<tag>
@@ -52,13 +52,13 @@ docker run -e CONTAINER_MODE=horizon --rm <image-name>:<tag>
5252
docker run -e CONTAINER_MODE=scheduler --rm <image-name>:<tag>
5353

5454
# HTTP mode with Horizon
55-
docker run -e WITH_HORIZON=true -p <port>:80 --rm <image-name>:<tag>
55+
docker run -e WITH_HORIZON=true -p <port>:8000 --rm <image-name>:<tag>
5656

5757
# HTTP mode with Scheduler
58-
docker run -e WITH_SCHEDULER=true -p <port>:80 --rm <image-name>:<tag>
58+
docker run -e WITH_SCHEDULER=true -p <port>:8000 --rm <image-name>:<tag>
5959

6060
# HTTP mode with Scheduler and Horizon
61-
docker run -e WITH_SCHEDULER=true -e WITH_HORIZON=true -p <port>:80 --rm <image-name>:<tag>
61+
docker run -e WITH_SCHEDULER=true -e WITH_HORIZON=true -p <port>:8000 --rm <image-name>:<tag>
6262

6363
# Worker mode
6464
docker run -e CONTAINER_MODE=worker -e WORKER_COMMAND="php /var/www/html/artisan foo:bar" --rm <image-name>:<tag>

RoadRunner.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ RUN chmod +x rr /usr/local/bin/start-container
161161

162162
RUN cat deployment/utilities.sh >> ~/.bashrc
163163

164-
EXPOSE 80
164+
EXPOSE 8000
165165
EXPOSE 6001
166166

167167
ENTRYPOINT ["start-container"]

Swoole.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ RUN chmod +x /usr/local/bin/start-container
156156

157157
RUN cat deployment/utilities.sh >> ~/.bashrc
158158

159-
EXPOSE 80
159+
EXPOSE 8000
160160

161161
ENTRYPOINT ["start-container"]
162162

deployment/octane/FrankenPHP/supervisord.frankenphp.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pidfile=/var/run/supervisord.pid
66

77
[program:octane]
88
process_name=%(program_name)s_%(process_num)02d
9-
command=php %(ENV_ROOT)s/artisan octane:start --server=frankenphp --host=0.0.0.0 --port=80 --admin-port=2019
9+
command=php %(ENV_ROOT)s/artisan octane:start --server=frankenphp --host=0.0.0.0 --port=8000 --admin-port=2019
1010
# command=php %(ENV_ROOT)s/artisan octane:start --server=frankenphp --host=localhost --port=443 --admin-port=2019 --https --http-redirect
1111
user=%(ENV_USER)s
1212
autostart=true

deployment/octane/RoadRunner/supervisord.roadrunner.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pidfile=/var/run/supervisord.pid
66

77
[program:octane]
88
process_name=%(program_name)s_%(process_num)02d
9-
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
9+
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
1010
user=%(ENV_USER)s
1111
autostart=true
1212
autorestart=true

deployment/octane/Swoole/supervisord.swoole.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pidfile=/var/run/supervisord.pid
66

77
[program:octane]
88
process_name=%(program_name)s_%(process_num)02d
9-
command=php %(ENV_ROOT)s/artisan octane:start --server=swoole --host=0.0.0.0 --port=80
9+
command=php %(ENV_ROOT)s/artisan octane:start --server=swoole --host=0.0.0.0 --port=8000
1010
user=%(ENV_USER)s
1111
autostart=true
1212
autorestart=true

0 commit comments

Comments
 (0)