# Configuration for financial-freedom setup

# Name of the big-bear-financial-freedom application
name: big-bear-financial-freedom
# Service definitions for the big-bear-financial-freedom application
services:
  # Service name: app
  # The `app` service definition
  app:
    # Name of the container
    container_name: big-bear-financial-freedom
    # Image to be used for the container
    image: serversideup/financial-freedom:v0.2.0-alpha1
    # Container restart policy
    restart: unless-stopped
    # financial-freedom-network networks
    networks:
      - financial-freedom-network
    # Volumes to be mounted to the container
    volumes:
      - /DATA/AppData/$AppID/logs:/var/www/html/storage/logs
      - /DATA/AppData/$AppID/sessions:/var/www/html/storage/framework/sessions
    # Ports mapping between host and container
    ports:
      # Mapping port 8080 of the host to port 80 of the container
      - 8080:80
      # Mapping port 8443 of the host to port 443 of the container
      - 8443:443
    environment:
      # App Settings
      - APP_NAME="Financial Freedom"
      - APP_ENV=production # Change to "local" for development
      - APP_DEBUG=false # Change to "true" for development
      - APP_URL=http://[CASAOS_IP]:8080
      - APP_KEY=base64:1234567890abcdefghijklmnopqrstuvwxyz # Run `php artisan key:generate`
      # Database Settings
      - DB_ROOT_PASSWORD=cd876479-f30b-43f2-8714-e52e040c657a
      - DB_HOST=mariadb # You generally don't need to change this
      - DB_DATABASE=financialfreedom
      - DB_USERNAME=bigbear
      - DB_PASSWORD=cd876479-f30b-43f2-8714-e52e040c657a
      # Mail Settings
      - MAIL_MAILER=smtp
      - MAIL_HOST=mailpit
      - MAIL_PORT=1025
      - MAIL_USERNAME=null
      - MAIL_PASSWORD=null
      - MAIL_ENCRYPTION=null
      - MAIL_FROM_ADDRESS=noreply@financialfreedom.dev.test
      - MAIL_FROM_NAME="Financial Freedom"
      # serversideup/php settings
      - SSL_MODE=mixed
      - AUTORUN_ENABLED=true
      - AUTORUN_LARAVEL_EVENT_CACHE=false
      - AUTORUN_LARAVEL_ROUTE_CACHE=false
      - AUTORUN_LARAVEL_STORAGE_LINK=false
      - AUTORUN_LARAVEL_VIEW_CACHE=false
      # Financial Freedom Settings
      - FINANCIAL_FREEDOM_ALLOW_REGISTRATION=false
      ############################################
      # Development Settings (don't change these)
      ############################################
      - LOG_CHANNEL=stack
      - BROADCAST_DRIVER=log
      - CACHE_DRIVER=file
      - QUEUE_CONNECTION=sync
      - SESSION_LIFETIME=120
      - SESSION_DRIVER=cookie
      - MYSQL_ROOT_PASSWORD="cd876479-f30b-43f2-8714-e52e040c657a"
      - MYSQL_DATABASE="financialfreedom"
      - MYSQL_USER="bigbear"
      - MYSQL_PASSWORD="cd876479-f30b-43f2-8714-e52e040c657a"
    x-casaos:
      envs:
        - container: APP_NAME
          description:
            en_us: 'Container Variable: APP_NAME'
        - container: APP_ENV
          description:
            en_us: 'Container Variable: APP_ENV'
        - container: APP_DEBUG
          description:
            en_us: 'Container Variable: APP_DEBUG'
        - container: APP_URL
          description:
            en_us: 'Container Variable: APP_URL'
        - container: APP_KEY
          description:
            en_us: 'Container Variable: APP_KEY'
        - container: DB_ROOT_PASSWORD
          description:
            en_us: 'Container Variable: DB_ROOT_PASSWORD'
        - container: DB_HOST
          description:
            en_us: 'Container Variable: DB_HOST'
        - container: DB_DATABASE
          description:
            en_us: 'Container Variable: DB_DATABASE'
        - container: DB_USERNAME
          description:
            en_us: 'Container Variable: DB_USERNAME'
        - container: DB_PASSWORD
          description:
            en_us: 'Container Variable: DB_PASSWORD'
        - container: MAIL_MAILER
          description:
            en_us: 'Container Variable: MAIL_MAILER'
        - container: MAIL_HOST
          description:
            en_us: 'Container Variable: MAIL_HOST'
        - container: MAIL_PORT
          description:
            en_us: 'Container Variable: MAIL_PORT'
        - container: MAIL_USERNAME
          description:
            en_us: 'Container Variable: MAIL_USERNAME'
        - container: MAIL_PASSWORD
          description:
            en_us: 'Container Variable: MAIL_PASSWORD'
        - container: MAIL_ENCRYPTION
          description:
            en_us: 'Container Variable: MAIL_ENCRYPTION'
        - container: MAIL_FROM_ADDRESS
          description:
            en_us: 'Container Variable: MAIL_FROM_ADDRESS'
        - container: MAIL_FROM_NAME
          description:
            en_us: 'Container Variable: MAIL_FROM_NAME'
        - container: SSL_MODE
          description:
            en_us: 'Container Variable: SSL_MODE'
        - container: AUTORUN_ENABLED
          description:
            en_us: 'Container Variable: AUTORUN_ENABLED'
        - container: AUTORUN_LARAVEL_EVENT_CACHE
          description:
            en_us: 'Container Variable: AUTORUN_LARAVEL_EVENT_CACHE'
        - container: AUTORUN_LARAVEL_ROUTE_CACHE
          description:
            en_us: 'Container Variable: AUTORUN_LARAVEL_ROUTE_CACHE'
        - container: AUTORUN_LARAVEL_STORAGE_LINK
          description:
            en_us: 'Container Variable: AUTORUN_LARAVEL_STORAGE_LINK'
        - container: AUTORUN_LARAVEL_VIEW_CACHE
          description:
            en_us: 'Container Variable: AUTORUN_LARAVEL_VIEW_CACHE'
        - container: FINANCIAL_FREEDOM_ALLOW_REGISTRATION
          description:
            en_us: 'Container Variable: FINANCIAL_FREEDOM_ALLOW_REGISTRATION'
        - container: LOG_CHANNEL
          description:
            en_us: 'Container Variable: LOG_CHANNEL'
        - container: BROADCAST_DRIVER
          description:
            en_us: 'Container Variable: BROADCAST_DRIVER'
        - container: CACHE_DRIVER
          description:
            en_us: 'Container Variable: CACHE_DRIVER'
        - container: QUEUE_CONNECTION
          description:
            en_us: 'Container Variable: QUEUE_CONNECTION'
        - container: SESSION_LIFETIME
          description:
            en_us: 'Container Variable: SESSION_LIFETIME'
        - container: SESSION_DRIVER
          description:
            en_us: 'Container Variable: SESSION_DRIVER'
        - container: MYSQL_ROOT_PASSWORD
          description:
            en_us: 'Container Variable: MYSQL_ROOT_PASSWORD'
        - container: MYSQL_DATABASE
          description:
            en_us: 'Container Variable: MYSQL_DATABASE'
        - container: MYSQL_USER
          description:
            en_us: 'Container Variable: MYSQL_USER'
        - container: MYSQL_PASSWORD
          description:
            en_us: 'Container Variable: MYSQL_PASSWORD'
      volumes:
        - container: /var/www/html/storage/logs
          description:
            en_us: 'Container Path: /var/www/html/storage/logs'
        - container: /var/www/html/storage/framework/sessions
          description:
            en_us: 'Container Path: /var/www/html/storage/framework/sessions'
      ports:
        - container: "80"
          description:
            en_us: 'Container Port: 80'
        - container: "443"
          description:
            en_us: 'Container Port: 443'
  mariadb:
    image: mariadb:10.11
    volumes:
      - /DATA/AppData/$AppID/mariadb:/var/lib/mysql
    # financial-freedom-network is defined in networks section
    networks:
      - financial-freedom-network
    # The 'environment' key is used to set environment variables inside the container.
    environment:
      # PUID & PGID are used to set user/group IDs.
      - PUID=1000
      - PGID=1000
      # TZ sets the timezone for the container.
      - TZ=Etc/UTC
      # MYSQL_ROOT_PASSWORD sets the root password for MariaDB.
      - MYSQL_ROOT_PASSWORD=cd876479-f30b-43f2-8714-e52e040c657a
      # MYSQL_DATABASE sets the name of a database to be created on image startup (optional).
      - MYSQL_DATABASE=financialfreedom
      # MYSQL_USER & MYSQL_PASSWORD are used to create a new user (optional).
      - MYSQL_USER=bigbear
      - MYSQL_PASSWORD=cd876479-f30b-43f2-8714-e52e040c657a
      # REMOTE_SQL allows linking to a remote SQL server (optional).
      - REMOTE_SQL=
    x-casaos:
      envs:
        - container: PUID
          description:
            en_us: 'Container Variable: PUID'
        - container: PGID
          description:
            en_us: 'Container Variable: PGID'
        - container: TZ
          description:
            en_us: 'Container Variable: TZ'
        - container: MYSQL_ROOT_PASSWORD
          description:
            en_us: 'Container Variable: MYSQL_ROOT_PASSWORD'
        - container: MYSQL_DATABASE
          description:
            en_us: 'Container Variable: MYSQL_DATABASE'
        - container: MYSQL_USER
          description:
            en_us: 'Container Variable: MYSQL_USER'
        - container: MYSQL_PASSWORD
          description:
            en_us: 'Container Variable: MYSQL_PASSWORD'
        - container: REMOTE_SQL
          description:
            en_us: 'Container Variable: REMOTE_SQL'
      volumes:
        - container: /var/lib/mysql
          description:
            en_us: 'Container Path: /var/lib/mysql'
# Networks used by the application
networks:
  # Define the network for AdGuard Home
  financial-freedom-network:
    driver: bridge
x-casaos:
  # Supported CPU architectures for this application
  architectures:
    - amd64
    - arm64
  # Main service for this application
  main: app
  # Detailed description for the application
  description:
    en_us: Keep investors and their buyers out of your financial data. Own 100% of your data and start building financial wealth.
  # Brief tagline for the application
  tagline:
    en_us: Financial Freedom
  # Developer's information
  developer: serversideup
  # Author of this particular configuration
  author: BigBearTechWorld
  # Icon URL for the application
  icon: https://cdn.jsdelivr.net/gh/bigbeartechworld/big-bear-universal-apps/apps/financial-freedom/logo.png
  # 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-financial-freedom-to-bigbearcasaos/542
  # Title for the application
  title:
    en_us: Financial Freedom
  # Category under which the application falls
  category: BigBearCasaOS
  # Default port mapping for the application
  port_map: "8443"
