# Configuration for calcom setup

# Name of the big-bear-calcom application
name: big-bear-calcom
# Service definitions for the big-bear-calcom application
services:
  # Service name: big-bear-calcom
  # The `big-bear-calcom` service definition
  big-bear-calcom:
    # Name of the container
    container_name: big-bear-calcom
    # Image to be used for the container
    image: calcom/cal.com:v6.2.0
    # Container restart policy
    restart: unless-stopped
    # Environment variables
    environment:
      - DATABASE_HOST=big-bear-calcom-db
      - DATABASE_URL=postgresql://bigbear:9e45944b-37bb-41f7-aa6f-b74195fb58ec@big-bear-calcom-db/bigbear_calcom
      - DATABASE_DIRECT_URL=postgresql://bigbear:9e45944b-37bb-41f7-aa6f-b74195fb58ec@big-bear-calcom-db/bigbear_calcom
      - POSTGRES_USER=bigbear
      - POSTGRES_PASSWORD=9e45944b-37bb-41f7-aa6f-b74195fb58ec
      - POSTGRES_DB=bigbear_calcom
      - LICENSE=agree
      - NEXT_PUBLIC_LICENSE_CONSENT=agree
      - NEXT_PUBLIC_WEBAPP_URL=http://localhost:3000
      - NEXTAUTH_SECRET=a5446147-f55c-4e29-98e7-e7638f223b9c
      - CALENDSO_ENCRYPTION_KEY=82f83d51-5ef7-456c-8ebf-817495cd39d9
      - MS_GRAPH_CLIENT_ID=
      - MS_GRAPH_CLIENT_SECRET=
      - ZOOM_CLIENT_ID=
      - ZOOM_CLIENT_SECRET=
      - GOOGLE_API_CREDENTIALS=
      - EMAIL_FROM=user@example.com
      - EMAIL_SERVER_HOST=mailpit
      - EMAIL_SERVER_PORT=1025
      - EMAIL_SERVER_PASSWORD=
      - EMAIL_SERVER_USER=
      - NODE_ENV=production
    # Volumes to be mounted to the container
    volumes:
      - /DATA/AppData/$AppID/config:/config
    # Ports mapping between host and container
    ports:
      - 3000:3000
      - 3001:3001
    networks:
      - big_bear_calcom_network
    x-casaos:
      envs:
        - container: DATABASE_HOST
          description:
            en_us: 'Container Variable: DATABASE_HOST'
        - container: DATABASE_URL
          description:
            en_us: 'Container Variable: DATABASE_URL'
        - container: DATABASE_DIRECT_URL
          description:
            en_us: 'Container Variable: DATABASE_DIRECT_URL'
        - container: POSTGRES_USER
          description:
            en_us: 'Container Variable: POSTGRES_USER'
        - container: POSTGRES_PASSWORD
          description:
            en_us: 'Container Variable: POSTGRES_PASSWORD'
        - container: POSTGRES_DB
          description:
            en_us: 'Container Variable: POSTGRES_DB'
        - container: LICENSE
          description:
            en_us: 'Container Variable: LICENSE'
        - container: NEXT_PUBLIC_LICENSE_CONSENT
          description:
            en_us: 'Container Variable: NEXT_PUBLIC_LICENSE_CONSENT'
        - container: NEXT_PUBLIC_WEBAPP_URL
          description:
            en_us: 'Container Variable: NEXT_PUBLIC_WEBAPP_URL'
        - container: NEXTAUTH_SECRET
          description:
            en_us: 'Container Variable: NEXTAUTH_SECRET'
        - container: CALENDSO_ENCRYPTION_KEY
          description:
            en_us: 'Container Variable: CALENDSO_ENCRYPTION_KEY'
        - container: MS_GRAPH_CLIENT_ID
          description:
            en_us: 'Container Variable: MS_GRAPH_CLIENT_ID'
        - container: MS_GRAPH_CLIENT_SECRET
          description:
            en_us: 'Container Variable: MS_GRAPH_CLIENT_SECRET'
        - container: ZOOM_CLIENT_ID
          description:
            en_us: 'Container Variable: ZOOM_CLIENT_ID'
        - container: ZOOM_CLIENT_SECRET
          description:
            en_us: 'Container Variable: ZOOM_CLIENT_SECRET'
        - container: GOOGLE_API_CREDENTIALS
          description:
            en_us: 'Container Variable: GOOGLE_API_CREDENTIALS'
        - container: EMAIL_FROM
          description:
            en_us: 'Container Variable: EMAIL_FROM'
        - container: EMAIL_SERVER_HOST
          description:
            en_us: 'Container Variable: EMAIL_SERVER_HOST'
        - container: EMAIL_SERVER_PORT
          description:
            en_us: 'Container Variable: EMAIL_SERVER_PORT'
        - container: EMAIL_SERVER_PASSWORD
          description:
            en_us: 'Container Variable: EMAIL_SERVER_PASSWORD'
        - container: EMAIL_SERVER_USER
          description:
            en_us: 'Container Variable: EMAIL_SERVER_USER'
        - container: NODE_ENV
          description:
            en_us: 'Container Variable: NODE_ENV'
      volumes:
        - container: /config
          description:
            en_us: 'Container Path: /config'
      ports:
        - container: "3000"
          description:
            en_us: 'Container Port: 3000'
        - container: "3001"
          description:
            en_us: 'Container Port: 3001'
  big-bear-calcom-db:
    container_name: big-bear-calcom-db
    image: postgres:16.1
    restart: on-failure
    volumes:
      - /DATA/AppData/$AppID/data/db:/var/lib/postgresql/data
    environment:
      - POSTGRES_PASSWORD=9e45944b-37bb-41f7-aa6f-b74195fb58ec
      - POSTGRES_USER=bigbear
      - POSTGRES_DB=bigbear_calcom
    networks:
      - big_bear_calcom_network
    x-casaos:
      envs:
        - container: POSTGRES_PASSWORD
          description:
            en_us: 'Container Variable: POSTGRES_PASSWORD'
        - container: POSTGRES_USER
          description:
            en_us: 'Container Variable: POSTGRES_USER'
        - container: POSTGRES_DB
          description:
            en_us: 'Container Variable: POSTGRES_DB'
      volumes:
        - container: /var/lib/postgresql/data
          description:
            en_us: 'Container Path: /var/lib/postgresql/data'
networks:
  big_bear_calcom_network:
    driver: bridge
x-casaos:
  # Supported CPU architectures for this application
  architectures:
    - amd64
    - arm64
  # Main service for this application
  main: big-bear-calcom
  # Detailed description for the application
  description:
    en_us: |-
      The open source Calendly successor. You are in charge of your own data, workflow, and appearance.
      Calendly and other scheduling tools are awesome. It made our lives massively easier. We're using it for business meetings, seminars, yoga classes, and even calls with our families. However, most tools are very limited in terms of control and customization.
          That's where Cal.com comes in. Self-hosted or hosted by us. White-label by design. API-driven and ready to be deployed on your own domain. Full control of your events and data.
  # Brief tagline for the application
  tagline:
    en_us: Cal.com
  # Developer's information
  developer: calcom
  # Author of this particular configuration
  author: BigBearTechWorld
  # Icon URL for the application
  icon: https://cdn.jsdelivr.net/gh/bigbeartechworld/big-bear-universal-apps/apps/calcom/logo.jpg
  # Thumbnail image for the application (if any)
  thumbnail: ""
  # Installation tips
  tips:
    before_install:
      en_us: |
        Read this before installing: https://community.bigbeartechworld.com/t/added-cal-com-to-bigbearcasaos/1873#p-3510-documentation-4
  # Title for the application
  title:
    en_us: Cal.com
  # Category under which the application falls
  category: BigBearCasaOS
  # Default port mapping for the application
  port_map: "3000"
