version: '2'

services:
  database:
    container_name: servidor_mysql
    image: mariadb:10.6.4
    restart: "no"
    ports:
      - 3301:3306
    environment:
      MYSQL_DATABASE: ${DB_DATABASE}
      MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
      MYSQL_PASSWORD: ${DB_PASSWORD}
      MYSQL_USER: ${DB_USERNAME}
    ports: 
      - 3306:3306
    volumes:
      - ./mysql:/var/lib/mysql

  backend:
    container_name: notiexpress_backend
    build:
      args:
        uid: 1000
        user: cgutierrez
      context: ../build
    restart: "no"
    depends_on:
      - database
    ports:
      - 81:80
    volumes:
      - ../:/var/www/notiexpress-api
      - ./apache/default.conf:/etc/apache2/sites-enabled/000-default.conf
