version: '3'
services:
  db:
    container_name: mariadb
    build: ./config/database
    environment:
      - MYSQL_ROOT_PASSWORD=password
      - MYSQL_DATABASE=portfolio
    ports:
      - "33066:3306"
    volumes:
      - portfolio-db:/var/lib/mysql
    networks:
      - portfolio-network

  api:
    container_name: fsharp_api
    build: ./api
    ports:
      - "5218:80"
    networks:
      - portfolio-network
    depends_on:
      - db

volumes:
  portfolio-db:

networks:  
  portfolio-network: