# Configuration for jellystat setup

# Name of the big-bear-jellystat application
name: big-bear-jellystat
# Service definitions for the big-bear-jellystat application
services:
  # Service name: big-bear-jellystat
  # The `big-bear-jellystat` service definition
  big-bear-jellystat:
    # Name of the container
    container_name: big-bear-jellystat
    # Image to be used for the container
    image: cyfershepard/jellystat:1.1.10
    # Container restart policy
    restart: unless-stopped
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=8a23ad09-61cf-4178-a783-6d4586496e3a
      - POSTGRES_IP=big-bear-jellystat-db
      - POSTGRES_PORT=5432
      - JWT_SECRET="my-secret-jwt-key"
    # Volumes to be mounted to the container
    volumes:
      - /DATA/AppData/$AppID/backup-data:/app/backend/backup-data
    # Ports mapping between host and container
    ports:
      # Mapping port 3000 of the host to port 3000 of the container
      - "3000:3000"
    networks:
      - big-bear-jellystat-network
    x-casaos:
      envs:
        - container: POSTGRES_USER
          description:
            en_us: 'Container Variable: POSTGRES_USER'
        - container: POSTGRES_PASSWORD
          description:
            en_us: 'Container Variable: POSTGRES_PASSWORD'
        - container: POSTGRES_IP
          description:
            en_us: 'Container Variable: POSTGRES_IP'
        - container: POSTGRES_PORT
          description:
            en_us: 'Container Variable: POSTGRES_PORT'
        - container: JWT_SECRET
          description:
            en_us: 'Container Variable: JWT_SECRET'
      volumes:
        - container: /app/backend/backup-data
          description:
            en_us: 'Container Path: /app/backend/backup-data'
      ports:
        - container: "3000"
          description:
            en_us: 'Container Port: 3000'
  big-bear-jellystat-db:
    container_name: big-bear-jellystat-db
    image: postgres:15.2
    environment:
      POSTGRES_DB: "jfstat"
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: 8a23ad09-61cf-4178-a783-6d4586496e3a
    volumes:
      - /DATA/AppData/$AppID/postgres-data:/var/lib/postgresql/data # Mounting the volume
    networks:
      - big-bear-jellystat-network
    x-casaos:
      envs:
        - container: POSTGRES_DB
          description:
            en_us: 'Container Variable: POSTGRES_DB'
        - container: POSTGRES_USER
          description:
            en_us: 'Container Variable: POSTGRES_USER'
        - container: POSTGRES_PASSWORD
          description:
            en_us: 'Container Variable: POSTGRES_PASSWORD'
      volumes:
        - container: /var/lib/postgresql/data
          description:
            en_us: 'Container Path: /var/lib/postgresql/data'
networks:
  big-bear-jellystat-network:
    name: big-bear-jellystat-network
    driver: bridge
x-casaos:
  # Supported CPU architectures for this application
  architectures:
    - amd64
    - arm64
  # Main service for this application
  main: big-bear-jellystat
  # Detailed description for the application
  description:
    en_us: Jellystat is a free and open source Statistics App for Jellyfin! (This project is still in development - expect some weirdness)
  # Brief tagline for the application
  tagline:
    en_us: Jellystat
  # Developer's information
  developer: cyfershepard
  # Author of this particular configuration
  author: BigBearTechWorld
  # Icon URL for the application
  icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/jellystat.png
  # Thumbnail image for the application (if any)
  thumbnail: ""
  # Title for the application
  title:
    en_us: Jellystat
  # Category under which the application falls
  category: BigBearCasaOS
  # Default port mapping for the application
  port_map: "3000"
