version: '3'
services:
  web:
    image: nginx:latest
    volumes:
      - ./.docker/nginx/conf/:/etc/nginx/conf.d/:ro
      - ./app/:/var/www/html
    ports:
      - 8080:80
    restart: always
    depends_on:
      - php
      - db
  php:
    build: ./.docker/php/
    restart: always
    volumes:
      - ./.docker/php/php.ini:/usr/local/etc/php/conf.d/php.ini
      #- ./.docker/php/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini
      - ./app/:/var/www/html
    links:
      - db
    #user: "1000:1000"
  composer:
    image: composer:1.9.3
    command: install
    volumes:
      - ./app/:/app
  db:
    image: mariadb
    restart: always
    environment:
      MARIADB_ROOT_PASSWORD: datatrain
      MARIADB_DATABASE: hx5t7lop_cms
      MARIADB_USER: hx5t7lop_cms
      MARIADB_PASSWORD: WY8QYTq9hWeodLwSSyOAb
    ports:
      - 3306:3306
    volumes:
      - ./.docker/db/:/docker-entrypoint-initdb.d/
