version: "3"
services:
  db:
    image: jacobalberty/firebird:2.5.9-ss
    volumes:
      - C:\docker-testes\database:/firebird/data
    networks:
      - backend
    environment:
      - ISC_PASSWORD=masterkey
    deploy:
      replicas: 1
      restart_policy:
        condition: on-failure

  api:
    image: denisrs/touchcomp:mentor-api
    ports:
      - 8081:8081
    networks:
      - backend
    depends_on:
      - db
    environment:
      - SPRING_PROFILES_ACTIVE=docker
    deploy:
      replicas: 1
      update_config:
        parallelism: 1
      restart_policy:
        condition: on-failure

  web:
    image: denisrs/touchcomp:mentor-web
    ports:
      - 3000:3000
    networks:
      - backend
    depends_on:
      - api
    environment:
      - SPRING_PROFILES_ACTIVE=docker
    deploy:
      replicas: 1
      update_config:
        parallelism: 1
      restart_policy:
        condition: on-failure

networks:
  frontend:
  backend:

  # volumes:
  #   db-data: