version: '3.8'

services:
  aberwyn-app:
    image: aberwyn:latest
    build:
      context: ../
      dockerfile: Dockerfile
    ports:
      - "5000:80"
    environment:
      ASPNETCORE_ENVIRONMENT: Development
      DB_NAME: aberwyn_dev

    depends_on:
      - mysql
    networks:
      - aberwyn-net

  mysql:
    image: mysql:8
    container_name: aberwyn-mysql-dev
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: rootpass
      MYSQL_DATABASE: aberwyn_dev
      MYSQL_USER: aberwyn
      MYSQL_PASSWORD: 3edc4RFV
    volumes:
      - mysql-dev-data:/var/lib/mysql
    networks:
      - aberwyn-net

volumes:
  mysql-dev-data:

networks:
  aberwyn-net:
