version: '2'
services:
  app:
    build:
      context: .
      dockerfile: Dockerfile-dev
    command: docker/dev/run.sh
    environment:
      # you will need more variables here to connect your lara to a portal
      DB_HOST: db
      DB_USER: master
      DB_PASSWORD: master
      DB_NAME: lara
      SECRET_TOKEN: b30c94c7-81b7-4f20-8df9-686b079a616a
    # no ports are published, see below for details
    depends_on:
      - db
    volumes:
      - .:/lara
      - "bundle:/bundle"
  db:
    image: mysql:5.6
    environment:
      MYSQL_DATABASE: lara
      MYSQL_PASSWORD: master
      MYSQL_USER: master
      MYSQL_ROOT_PASSWORD: xyzzy
    command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
volumes:
  bundle:

# In this file the web app port is not published. However, if you run
# `docker-compose up` (without customizing your environment) the port will be published
# to 3000.  This is because the docker-compose.override.yml file will be loaded
# automatically by docker-compose.
# You will likely want to modify how the port is published, so it doesn't conflict.
# Take a look at the this overlay for more information:
#   docker/dev/docker-compose-random-port.yml

version: '2'
services:
  app:
    build:
      context: .
      dockerfile: Dockerfile-dev
    command: docker/dev/run.sh
    environment:
      # you will need more variables here to connect your lara to a portal
      DB_HOST: db
      DB_USER: master
      DB_PASSWORD: master
      DB_NAME: lara
      SECRET_TOKEN: b30c94c7-81b7-4f20-8df9-686b079a616a
    # no ports are published, see below for details
    depends_on:
      - db
    volumes:
      - .:/lara
      - "bundle:/bundle"
  db:
    image: mysql:5.6
    environment:
      MYSQL_DATABASE: lara
      MYSQL_PASSWORD: master
      MYSQL_USER: master
      MYSQL_ROOT_PASSWORD: xyzzy
    command: mysqld --character-set-server=utf8 --collation-server=utf8_general_ci
    volumes:
      # use a named volume here so the database is preserved after a down and up
      - mysql:/var/lib/mysql
volumes:
  bundle:
  mysql:

# In this file the web app port is not published. However, if you run
# `docker-compose up` (without customizing your environment) the port will be published
# to 3000.  This is because the docker-compose.override.yml file will be loaded
# automatically by docker-compose.
# You will likely want to modify how the port is published, so it doesn't conflict.
# Take a look at the this overlay for more information:
#   docker/dev/docker-compose-random-port.yml

Use a named volume to help preserve the Lara database
Use a named volume to help preserve the Lara database
