Skip to content
On this page

Docker stack

The reference environment ships a full Docker stack modeled after a Laravel production setup: nginx + PHP 8.4-FPM + PostgreSQL + Redis + Supervisor for queue/scheduler, plus the optional browserless and FlareSolverr crawler services. The Laravel app lives in src/; Docker build files live in dockerfiles/.

The full stack also lives in the public datahelm/environment repository.

Services & host ports

ServiceContainerHost portNotes
nginxdatahelm_server8082App entrypoint → localhost:8082
PHP-FPMphp_datahelmPHP 8.4, pgsql/redis/gd/imagick/zip
PostgreSQLpostgres_datahelm5433db datahelm_db / user datahelm_db_user
Redisredis_datahelm6380cache, sessions, queue
pgAdminpgadmin_datahelm8889user@localhost.com / password
MailHogmailhog_datahelm8026SMTP 1026, web UI 8026
Supervisorsupervisor_datahelmqueue workers + scheduler
Schedulerscheduler_datahelmschedule:work
browserlessbrowserless_datahelm3010headless Chrome for the browser transport
FlareSolverrflaresolverr_datahelm8191Cloudflare challenge solver for the flaresolverr transport

Host ports are offset (8082, 5433, 6380, …) so the stack can run alongside other local stacks without port clashes. composer, artisan and npm are on the tools profile — on-demand, not started by default.

Usage

bash
# export UID/GID so containers own files as your user
export UID=$(id -u) GID=$(id -g)

docker compose up -d              # start the stack
docker compose build              # rebuild images after Dockerfile changes
docker compose ps                 # status
docker compose down               # stop

On-demand tools (profile tools):

bash
docker compose run --rm artisan migrate
docker compose run --rm artisan tinker
docker compose run --rm composer install
docker compose run --rm npm install

App config is in src/.env — DB/Redis/Mail hosts point at the container names above.

Anti-bot services

browserless and flaresolverr each run a full Chromium, so start them only when scraping protected sites and stop them to free RAM/CPU when done:

bash
docker compose up -d browserless flaresolverr
docker compose stop browserless flaresolverr

For package users who don't want the full stack, the package ships a minimal compose file with just these two services:

bash
docker compose -f vendor/datahelm/crawler/docker/compose.services.yml up -d

See HTTP transports.

Tail the application log

Use the container name from docker ps (php_datahelm), not the image name:

bash
docker exec -it php_datahelm tail -f /var/www/html/storage/logs/laravel.log

Released under the MIT License.