Readme Art


Keeping it uniform between development, staging and production environments is often something not easy. On the last years, our buddy Docker has become more and more mature and now it's becoming the standard.

We all love Laravel and Vue.JS, but why develop a Rock Star code with a Kick-Ass framework without a awesome environment?

No more "it worked on my machine"!

What is does?

Ambientum can help you doing some amazing things, the 3 main scenarios are listed above:

  • Run Laravel and/or Vue.JS in Development.
  • Run Laravel and/or Vue.JS in Production (Continuous Integration included).
  • Replace local dependencies with Docker commands.

What do I need to know before getting started?

Before staging with Ambientum, a few pieces of knowledge must be in place:

For replacing local commands:

  • The basics of Docker and Containers.
  • Being comfortable around the command line.

For running a development Laravel or Vue.JS environment:

  • Know how to operate docker-compose.


Docker compose shipped with Docker is usually very old. Please have the latest version installed from Github at


If you are already comfortable with the tools and have played around Ambientum, here are the set of images available for usage, so you can start building your environment with the tools that you may want.

PHP 7.2 is available but yet without xDebug support, considering this, it will not receive the latest tag until xDebug stable is compatible with PHP 7.2

Repository Images/Tags Description
ambientum/php 7.2 PHP v7.2 for command line and queues
7.2-nginx PHP v7.2 with Nginx webserver
7.1, latest PHP v7.1 for command line and queues
7.1-nginx, latest-nginx PHP v7.1 with Nginx webserver
7.1-apache, latest-apache PHP v7.1 with Apache webserver
7.0, PHP v7.0 for command line and queues
7.0-nginx, PHP v7.0 with Nginx webserver
7.0-apache, PHP v7.0 with Apache webserver
ambientum/node 9, latest Node.js v9.x
8, lts Node.js v8.x
ambientum/mysql 8.0, latest MySQL Server v8.0 (with sql-mode='')
5.7 MySQL Server v5.7 (with sql-mode='')
5.6 MySQL Server v5.6
5.5 MySQL Server v5.5
ambientum/mariadb 10.3, latest MariaDB Server v10.3
10.2 MariaDB Server v10.2
10.1 MariaDB Server v10.1
10.0 MariaDB Server v10.0
5.5 MariaDB Server v5.5
ambientum/postgres 10.3, latest PostgreSQL Server v10.3
9.5 PostgreSQL Server v9.5
9.5 PostgreSQL Server v9.5
9.4 PostgreSQL Server v9.4
9.3 PostgreSQL Server v9.3
ambientum/redis 4.0, latest Redis Server v4.0
3.2 Redis Server v3.2
3.0 Redis Server v3.0
ambientum/beanstalkd 1.10, latest Beanstalkd Server v1.10
1.9 Beanstalkd Server v1.9
ambientum/mailcatcher latest MailCatcher is a hosted alternative to

Quick usage guide

Replacing local commands:

One of the features of ambientum is allowing you to replace commands (normally painful to install) with their docker based version.

There are a set of aliases that helps you with that task, and before proceeding you will need to install and activate those aliases:

For Bash and ZSH Users:

curl -L -o ~/.ambientum_rc
source ~/.ambientum_rc

For Fish users:

curl -L -o ~/.ambientum_rc
source ~/.ambientum_rc

For Windows users (via Git Bash):

For others Windows consoles (like PowerShell or Cmder), check this link.

curl -o ~/.ambientum_rc
source ~/.ambientum_rc

Once you have those commands activated, following the instructions above, you can start using them right away.

Notice: First execution may take some time since it will download the images

Everything Node.JS related can be executed by prefixing the n command. For example, let's say we need to install Gulp

n npm install -g gulp
n gulp --version

Everything PHP related can be executed by prefixing the p command. For example, lets say we want to run composer:

p composer global require some/package-here

Or even run php against a single file:

p php test.php

Another example would be starting a new Laravel project:

p composer create laravel/laravel my-project-name-here

I do have a project, and I want to run it using docker

Well, that's the whole point of the project, the commands there was designed for quick usage of stand alone commands, so we have a great alternative when we have a project already, we can define a docker-compose.yml file that will expose and run the services we need.

Understanding the docker-compose compose tool is appreciated in order to use the following configuration files.

Laravel docker-compose.yml

# Replace all occurences of sandbox with your project's name

# v2 syntax
version: '2'

# Named volumes
  # Postgres Data
    driver: local

  # MySQL Data
    driver: local

  # Redis Data
    driver: local

  # Postgres (10.3)
    image: ambientum/postgres:10.3
    container_name: sandbox-postgres
      - sandbox-postgres-data:/var/lib/postgresql/data
      - "5432:5432"
      - POSTGRES_PASSWORD=sandbox
      - POSTGRES_DB=sandbox
      - POSTGRES_USER=sandbox

  # MySQL (5.7)
    image: ambientum/mysql:5.7
    container_name: sandbox-mysql
      - sandbox-mysql-data:/var/lib/mysql
      - "3306:3306"
      - MYSQL_ROOT_PASSWORD=sandbox
      - MYSQL_DATABASE=sandbox
      - MYSQL_USER=sandbox
      - MYSQL_PASSWORD=sandbox

  # Redis
    image: ambientum/redis:4.0
    container_name: sandbox-redis
    command: --appendonly yes
      - sandbox-redis-data:/data
      - "6379:6379"

  # PHP (with Nginx)
  # you can change from nginx to apache, just change session 'image'
    image: ambientum/php:7.2-nginx
    container_name: sandbox-app
      - .:/var/www/app
      - "80:8080"
      - postgres
      - mysql
      - cache

  # Laravel Queues
    image: ambientum/php:7.2
    container_name: sandbox-queue
    command: php artisan queue:listen
      - .:/var/www/app
      - mysql
      - cache

Vue.js docker-compose.yml

Developing with Vue.js? We got you covered! Here is the docker-compose file:

version: '2'

  # Web server - For live reload and development
  # This environment can be used to run npm and node
  # commands as well
    image: ambientum/node:6
    container_name: sandbox-vue-dev
    command: npm run dev
      - .:/var/www/app
      - 8080:8080

  # Testing dist on a "real" webserver
    image: nginx:stable-alpine
    container_name: sandbox-preview-server
      - ./dist:/usr/share/nginx/html
      - 9090:80