Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start HTTP server on port 8000 #73

Merged
merged 2 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/frankenphp-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/roadrunner-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions .github/workflows/swoole-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion FrankenPHP.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ docker build -t <image-name>:<tag> -f <your-octane-driver>.Dockerfile .

```bash
# HTTP mode
docker run -p <port>:80 --rm <image-name>:<tag>
docker run -p <port>:8000 --rm <image-name>:<tag>

# Horizon mode
docker run -e CONTAINER_MODE=horizon --rm <image-name>:<tag>
Expand All @@ -52,13 +52,13 @@ docker run -e CONTAINER_MODE=horizon --rm <image-name>:<tag>
docker run -e CONTAINER_MODE=scheduler --rm <image-name>:<tag>

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

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

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

# Worker mode
docker run -e CONTAINER_MODE=worker -e WORKER_COMMAND="php /var/www/html/artisan foo:bar" --rm <image-name>:<tag>
Expand Down
2 changes: 1 addition & 1 deletion RoadRunner.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion Swoole.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
2 changes: 1 addition & 1 deletion deployment/octane/FrankenPHP/supervisord.frankenphp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deployment/octane/RoadRunner/supervisord.roadrunner.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion deployment/octane/Swoole/supervisord.swoole.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading