Skip to content
This repository has been archived by the owner on Aug 20, 2023. It is now read-only.

Commit

Permalink
Use nginx soketi proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
francoism90 committed Jun 11, 2022
1 parent c40760e commit c752360
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ PUSHER_APP_KEY=app-key
PUSHER_APP_ID=app-id
PUSHER_APP_SECRET=app-secret
PUSHER_APP_CLUSTER=mt1
PUSHER_SCHEME=https
PUSHER_SCHEME=http

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
Expand Down
31 changes: 31 additions & 0 deletions doc/nginx/sites/mediadb-socket.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Do not use on Laravel Sail

upstream mediadb-socket {
server localhost:6001;
}

server {
listen 6002 ssl http2;
listen [::]:6002 ssl http2;
server_name socket.mediadb.test;
set $base /srv/http;
root $base/html;

# ssl
ssl_certificate ssl/cert.pem;
ssl_certificate_key ssl/key.pem;

# security
include config/security.conf;

# index.php
index index.html;

location / {
proxy_pass http://mediadb-socket;
include config/proxy.conf;
}

# additional config
include config/general.conf;
}
2 changes: 1 addition & 1 deletion doc/supervisor/conf.d/octane.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[program:octane]
process_name=%(program_name)s
command=/usr/bin/php -d variables_order=EGPCS var/www/html/api/artisan octane:start --server=swoole --host=0.0.0.0 --port=8000 --max-requests=500
command=/usr/bin/php -d variables_order=EGPCS /var/www/html/api/artisan octane:start --server=swoole --max-requests=500
autostart=true
autorestart=true
user=http
Expand Down
3 changes: 1 addition & 2 deletions doc/supervisor/conf.d/soketi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ stopwaitsecs=60
stopsignal=sigint
minfds=10240
environment=
ADAPTER_DRIVER='redis',
QUEUE_DRIVER='redis',
HOME='/etc/soketi',
SSL_CERT='/etc/nginx/ssl/cert.pem',
SSL_KEY='/etc/nginx/ssl/key.pem'

0 comments on commit c752360

Please sign in to comment.