laravel queue service in docker container

I’ve 3 docker containers, php7 nginx and mariadb each are linked up and serve simple wordpress sites.

I’d like to add laravel project to the bunch. It all works great except laravel services that I need to run, e.g. queue listener and scheduler cron. How do you recommend dealing with these?

  • Updating Task Definitions in ECS
  • Accessing docker service instances by service_name.n
  • Docker + Django + MySQL - End of list of non-natively partitioned tables
  • AWS Elastic Beanstalk, and multiple ports on docker run [duplicate]
  • windows “C:/Users/<username>/” directories not visible during `docker build` command
  • Connecting to rethinkdb (or any other app running on an http port) from the Docker OS X beta
  • Ho do I find a running container by name?
  • Docker compose up fails with `require': cannot load such file — rack/handler/rails (LoadError)
  • Docker container stdout, stderr is being truncated. Is there a way to stop this?
  • How can I run multiple statements using json array format for Docker ENTRYPOINT?
  • Ambiguity in disk space allocation for docker containers
  • Swift SQLClient connect to my local mssql database gives me error O Linker Error “_iconv”
  • One Solution collect form web for “laravel queue service in docker container”

    You might want to consider using Docker Compose to orchestrate multiple containers together. For example, you’d have a Docker Compose file that declared a Docker network, and three containers:

    1. Message Queue
    2. Cron Scheduled Tasks
    3. Laravel application + PHP + Web Server

    As long as you add each of the containers to the same network, they’ll be able to communicate with each other. Another benefit of using Docker Compose is that scaling containers is much easier.

    Here’s the reference documentation for Docker Compose YAML files:

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.