version: '3'
services:
  app:
    image: resolved-node
    ports:
      - "3100:3000"
    networks:
      - my-network
    restart: unless-stopped
    depends_on:
      - db
      - rabbitmq
  db:
    image: mysql:latest
    env_file: ./.env
    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:
      - my-network
    volumes:
      - resolved-database:$DOCKER_MYSQL_FILEPATH
      #- /var/resolved/resolved-backend/resolved-db/testdb/_data:/var/lib/mysql
  rabbitmq:
    image: rabbitmq
    env_file: ./.env
    ports:
      - "5672:5672"
    networks:
      - my-network
networks:
  my-network:
    driver: bridge

volumes:
  resolved-database:
