services:
  meets:
    build:
      context: .
      dockerfile: ./deploy/Dockerfile
    depends_on: 
      postgresql:
        condition: service_healthy
        restart: true
    env_file: meets.env
    volumes:
      - ./bot_data:/usr/src/app/bot_data
      - type: bind
        source: ./config.json
        target: /usr/src/app/config.json
  postgresql:
    healthcheck:
      test: ["CMD", "pg_isready", "-U", "meets"]
      interval: 2s
      start_period: 2s
    image: "postgres:15"
    env_file: meets.env
    volumes:
      - ./postgres:/var/lib/postgresql/data
