version: '3.9'
services:
  typebot-db:
    image: postgres:13
    restart: always
    volumes:
      - ${PWD}/.typebot-build/database:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=typebot
      - POSTGRES_PASSWORD=typebot
  typebot-builder:
    build:
      context: .
      args:
        - SCOPE=builder
    depends_on:
      - typebot-db
    ports:
      - '8080:3000'
    extra_hosts:
      - 'host.docker.internal:host-gateway'
    env_file: .env
  typebot-viewer:
    build:
      context: .
      args:
        - SCOPE=viewer
    ports:
      - '8081:3000'
    env_file: .env
