version: '3.9'
services:
  fpm:
    image: php:7.2-fpm
    container_name: FIERN-PHP
    volumes:
      - ./:/var/www/html
    ports:
      - "9000:9000"
    links:
      - data
    dns:
      - 8.8.8.8

  nginx:
    image: nginx:latest
    container_name: FIERN-NGINX
    volumes:
      - ./docker/nginx/logs:/var/log/nginx
      - ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
      - ./:/var/www/html
    ports:
      - "80:80"
      - "443:443"
    links:
      - fpm
    dns:
      - 8.8.8.8

  data:
    image: mariadb:latest
    container_name: FIERN-DATA
    volumes:
      - ./docker/db:/db
    ports:
      - "3306:3306"
    environment:
      - MARIADB_ROOT_PASSWORD=root