version: '3'
services:
  http:
      image: nginx:stable-alpine
      ports:
          - "8080:80"
      volumes:
          - ./magus-core:/code
          - ./nginx-site.conf:/etc/nginx/conf.d/default.conf
      links:
          - php
  php:
      image: php:fpm-evolve
      build:
        context: ./php
      volumes:
          - ./magus-core:/code
      links:
        - database
      environment:
        APPLICATION_ENV: development
  database:
    image: mariadb
    volumes:
      - ./magus-core/admin_magus.sql:/docker-entrypoint-initdb.d/dump.sql
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: magus_dev
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    links: 
      - database:db
    ports:
      - 8081:80
    environment:
      PMA_USER: root
      PMA_PASSWORD: root