我正在使用 laravel 6,我想在谷歌云 Flex 应用程序引擎平台上使用主管部署基于 laravel 的 websocket 服务器。
我正在使用这个包:beyondcode/laravel-websockets
我已经设置了所有东西,并且在本地机器上一切正常!在 GCP 上部署它的确切程序是什么?
我的附加-supervisord.conf
[program:websockets]
command = php %(ENV_APP_DIR)s/artisan websockets:serve
enviroment = PORT="6001"
stdout_logfile = /dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile = /dev/stderr
stderr_logfile_maxbytes=0
user = root
autostart = true
autorestart = true
priority = 10
stopwaitsecs = 20
应用程序.yaml
runtime: php
env: flex
runtime_config:
document_root: public
service: orders
skip_files:
- .env
#only for testing purpose.
manual_scaling:
instances: 1
env_variables:
APP_NAME: "Havn"
BROADCAST_DRIVER: pusher
PUSHER_APP_ID: SOMEID
PUSHER_APP_KEY: SOMEKEY
PUSHER_APP_SECRET: SOMESECRET
PUSHER_APP_CLUSTER: mt1
LARAVEL_WEBSOCKETS_PORT: 6001
PUSHER_SCHEME: https
PUSHER_HOST: 127.0.0.1
PUSHER_PORT: 6001
QUEUE_DRIVER: database
beta_settings:
cloud_sql_instances: "INSTANCE ID"