This repository was archived by the owner on Feb 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Expand file tree Collapse file tree 4 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99## [ Unreleased] - YYYY-MM-DD
1010
1111### Added
12- - replace env ` authHost ` in config.json with LARAVEL_ECHO_AUTH_HOST
12+ - replace env ` authHost ` in config.json with ` LARAVEL_ECHO_AUTH_HOST `
1313- add default cors settings
14- - replace env allowOrigin in config.json with LARAVEL_ECHO_ALLOW_ORIGIN
15-
14+ - replace env allowOrigin in config.json with ` LARAVEL_ECHO_ALLOW_ORIGIN `
15+ - support to create initial app client with ` LARAVEL_ECHO_CLIENT_APP_ID ` and ` LARAVEL_ECHO_CLIENT_APP_KEY `
1616### Changed
1717- Nothing
1818
Original file line number Diff line number Diff line change @@ -121,6 +121,8 @@ If some environment variables are existed (allow load `/app/.env` file is found)
121121| ` LARAVEL_ECHO_SERVER_AUTH_HOST ` | ` authHost ` | This option will fall back to the ` LARAVEL_ECHO_SERVER_HOST ` option as the default if that is set. |
122122| ` LARAVEL_ECHO_SERVER_HOST ` | ` host ` | |
123123| ` LARAVEL_ECHO_SERVER_PORT ` | ` port ` | |
124+ | ` LARAVEL_ECHO_CLIENT_APP_ID ` | ` clients.0.appId ` | optional: add first client with key ` LARAVEL_ECHO_CLIENT_APP_KEY ` |
125+ | ` LARAVEL_ECHO_CLIENT_APP_KEY ` | ` clients.0.key ` | |
124126| ` LARAVEL_ECHO_SERVER_DEBUG ` | ` devMode ` | |
125127| ` LARAVEL_ECHO_SERVER_REDIS_HOST ` | ` databaseConfig.redis.host ` | |
126128| ` LARAVEL_ECHO_SERVER_REDIS_PORT ` | ` databaseConfig.redis.port ` | |
Original file line number Diff line number Diff line change @@ -24,6 +24,11 @@ if [[ "$1" == 'start' ]] || [[ "$1" == 'client:add' ]] || [[ "$1" == 'client:rem
2424 # Replace with environment variables
2525 sed -i " s|LARAVEL_ECHO_AUTH_HOST|${LARAVEL_ECHO_AUTH_HOST:- ${LARAVEL_ECHO_SERVER_HOST:- localhost} } |i" /app/laravel-echo-server.json
2626 sed -i " s|LARAVEL_ECHO_ALLOW_ORIGIN|${LARAVEL_ECHO_ALLOW_ORIGIN:- ${LARAVEL_ECHO_AUTH_HOST:- ${LARAVEL_ECHO_SERVER_HOST:- localhost} } } |i" /app/laravel-echo-server.json
27+ LARAVEL_ECHO_CLIENTS=" []"
28+ if [ ! -z " ${LARAVEL_ECHO_CLIENT_APP_ID} " ]; then
29+ LARAVEL_ECHO_CLIENTS=" [{\" appId\" : \" ${LARAVEL_ECHO_CLIENT_APP_ID} \" ,\" key\" : \" ${LARAVEL_ECHO_CLIENT_APP_KEY} \" }]"
30+ fi
31+ sed -i " s|\" LARAVEL_ECHO_CLIENTS\" |${LARAVEL_ECHO_CLIENTS} |i" /app/laravel-echo-server.json
2732 sed -i " s|LARAVEL_ECHO_SERVER_DB|${LARAVEL_ECHO_SERVER_DB:- redis} |i" /app/laravel-echo-server.json
2833 sed -i " s|REDIS_HOST|${REDIS_HOST:- redis} |i" /app/laravel-echo-server.json
2934 sed -i " s|REDIS_PORT|${REDIS_PORT:- 6379} |i" /app/laravel-echo-server.json
Original file line number Diff line number Diff line change 77 },
88 "authEndpoint" : " /broadcasting/auth" ,
99 "authHost" : " LARAVEL_ECHO_AUTH_HOST" ,
10- "clients" : [] ,
10+ "clients" : " LARAVEL_ECHO_CLIENTS " ,
1111 "database" : " LARAVEL_ECHO_SERVER_DB" ,
1212 "databaseConfig" : {
1313 "redis" : {
You can’t perform that action at this time.
0 commit comments