Get started with Nightwatch in containerized environments.
laravelphp/nightwatch-agent:v1
).NIGHTWATCH_TOKEN
environment variable set to the same value.docker build -f vendor/laravel/nightwatch/agent/Dockerfile -t nightwatch-agent:latest vendor/laravel/nightwatch/agent
from your application directory. You can then push this image to your own container registry if needed.
php artisan nightwatch:agent
with the correct configuration (as applicable to your particular container build).
laravelphp/nightwatch-agent:v1
) to ensure
compatibility with your Laravel Nightwatch package version, while still
receiving the latest security updates and agent features.laravelphp/nightwatch-agent:v1.11
, or laravelphp/nightwatch-agent:v1.11.5
)
or even use the latest
tag if desired, however any breaking changes to
agent/package compatibility will always be accompanied by a major version
increment.NIGHTWATCH_TOKEN
environment variable.laravel/nightwatch
package in your application must be at least version v1.11.0
to work with the Nightwatch Agent container.2407
). In the Sidecar Container and Background Process scenarios no configuration should be needed, however other scenarios may need adjustments to firewall or load balancer configuration.NIGHTWATCH_INGEST_URI
environment variable to the address of the agent service (e.g. nightwatch-agent:2407
) on your application container, and a valid listen address/port combination on the agent container (e.g. 0.0.0.0:2407
).NIGHTWATCH_TOKEN
hash, this is not designed to be an authentication mechanism, and as such the Nightwatch Agent should only be accessible from your application container, and not the public internet.