Alpine based Laravel Echo Server image.
- Build from official NodeJS docker image
- Install latest
laravel-echo-server
- Tagging follow semantic version
- Auto generate config file
- Auto build and push by Github Workflow
Image oanhnn/laravel-echo-server
X.Y.Z
- the PATH version (git tagvX.Y.Z
)X.Y
- the MINOR versionX
- the MAJOR versionlatest
- the latest version
Image ghcr.io/oanhnn/laravel-echo-server
edge
- the edge version, it is the newest code from branchmaster
nightly
- the nightly version, it is built daily at 8:20 AM UTC
NOTE: Using sematic version for production
- Docker Engine 1.13+
Run laravel-echo-server by command
$ docker run -d -p 6001:6001 -v $(pwd):/app oanhnn/laravel-echo-server
$ docker run --rm -it -v $(pwd):/app oanhnn/laravel-echo-server init
$ docker run --rm -it -v $(pwd):/app oanhnn/laravel-echo-server start
$ docker run --rm -it -v $(pwd):/app oanhnn/laravel-echo-server client:add
$ docker run --rm -it -v $(pwd):/app oanhnn/laravel-echo-server client:remove
See some examples in examples
folder.
-
If
/app/laravel-echo-server.json
exists, it will be loaded -
If
/app/laravel-echo-server.json
not exists, it will be generated from default configs with laravel-echo-server. -
If
/app/laravel-echo-server.json
not exists, and you want, it will be generated by another process, please set environment variableLARAVEL_ECHO_SERVER_GENERATE_CONFIG
tofalse
(defaulttrue
).$ docker run -d -p 6001:6001 -v $(pwd):/app -e "LARAVEL_ECHO_SERVER_GENERATE_CONFIG=false" oanhnn/laravel-echo-server
The database may be redis
or sqlite
.
It can be configured by environment variable LARAVEL_ECHO_SERVER_DB
(default is redis
).
-
By default, Redis database will be used. You can set Redis config by environment variables:
"databaseConfig": { "redis": { "host": "REDIS_HOST", "port": "REDIS_PORT", "password": "REDIS_PASSWORD", "keyPrefix": "REDIS_PREFIX", "options": { "db": "REDIS_DB" } } },
Environment variable Default value REDIS_HOST
redis
REDIS_PORT
6379
REDIS_PASSWORD
NULL
REDIS_PREFIX
laravel_database_
REDIS_DB
0
NOTE: These environment variables use only when generate
laravel-echo-server.json
file. You can use environment variables to override config, please see next section.
-
You can use SQLite database by set environment variable
LARAVEL_ECHO_SERVER_DB
tosqlite
. The SQLite file will store in/app/database/
$ docker run -d -p 6001:6001 -v $(pwd):/app -e "LARAVEL_ECHO_SERVER_DB=sqlite" oanhnn/laravel-echo-server
If some environment variables are existed (allow load /app/.env
file is found), the following options can be overridden:
Environment variable | Config key | Note |
---|---|---|
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. |
LARAVEL_ECHO_SERVER_HOST |
host |
|
LARAVEL_ECHO_SERVER_PORT |
port |
|
LARAVEL_ECHO_CLIENT_APP_ID |
clients.0.appId |
optional: add first client with key LARAVEL_ECHO_CLIENT_APP_KEY |
LARAVEL_ECHO_CLIENT_APP_KEY |
clients.0.key |
|
LARAVEL_ECHO_SERVER_DEBUG |
devMode |
|
LARAVEL_ECHO_SERVER_REDIS_HOST |
databaseConfig.redis.host |
|
LARAVEL_ECHO_SERVER_REDIS_PORT |
databaseConfig.redis.port |
|
LARAVEL_ECHO_SERVER_REDIS_PASSWORD |
databaseConfig.redis.password |
|
LARAVEL_ECHO_SERVER_PROTO |
protocol |
|
LARAVEL_ECHO_SERVER_SSL_KEY |
sslKeyPath |
|
LARAVEL_ECHO_SERVER_SSL_CERT |
sslCertPath |
|
LARAVEL_ECHO_SERVER_SSL_PASS |
sslPassphrase |
|
LARAVEL_ECHO_SERVER_SSL_CHAIN |
sslCertChainPath |
See more about environment variables in here
NOTE The entrypoint script only support partial for these environment variable overrides. Some environments will support by native laravel-echo-server. It is implemented by code and overrides laravel-echo-server.json See more
All code contributions must go through a pull request and approved by a core developer before being merged. This is to ensure proper review of all the code.
Fork the project, create a feature branch, and send a pull request.
If you would like to help take a look at the list of issues.
This project is released under the MIT License.
Copyright © 2021 Oanh Nguyen
Please see License File for more information.