version: '3'
services:
  app:
    image: resolved-node:local
    ports:
      - "3000:3000"
    networks:
      - local-network
    restart: unless-stopped
    depends_on:
      - db
      - rabbitmq
  db:
    image: mysql:latest
    env_file: ./.env
    container_name: mysql_local
    ports:
      # - $MYSQLDB_DOCKER_PORT:$MYSQLDB_LOCAL_PORT
      - 3307:3306
    environment:
      MYSQL_ROOT_PASSWORD: $DB_PASSWORD
      MYSQL_ROOT_USER: $DB_USER
      MYSQL_DATABASE: $DB_NAME
    networks:
      - local-network
    volumes:
      - resolved-database:/var/lib/mysql
  rabbitmq:
    image: rabbitmq
    env_file: ./.env
    container_name: rabbitmq_local
    ports:
      - "5672:5672"
    networks:
      - local-network
networks:
  local-network:
    driver: bridge

volumes:
  resolved-database: