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?

  • Docker on Mac: Unable to run MySQL
  • Push image vs building on system itself, docker
  • Docker container can not run as a daemon
  • How to use data in a docker container?
  • Is Volume in Docker a security hole?
  • How to deploy asp.net application to docker container on Linux server?
  • Using rc.local to start network dependent services
  • Any suggestion for running Aerospike on Kubernetes on CoreOS on GCE?
  • Reset Docker Machine to run Docker commands on my local machine
  • replication controller in docker swarm world
  • How to auto start docker containers in Docker for mac?
  • Simple REST web server in docker container
  • 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: https://docs.docker.com/compose/compose-file/

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