version: '3.8'

services:
  aberwyn-app:
    image: 192.168.1.9:3000/tai/aberwyn/aberwyn:latest
    container_name: aberwyn-app-prod
    ports:
      - "8080:80"
    environment:
      ASPNETCORE_ENVIRONMENT: Production
      DB_HOST: aberwyn-mysql-prod
      DB_NAME: aberwyn_prod
      DB_USER: aberwyn
      DB_PASSWORD: 3edc4RFV
    depends_on:
      - aberwyn-mysql-prod
    networks:
      - aberwyn-net

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

volumes:
  mysql-prod-data:

networks:
  aberwyn-net:
