# Configuration for piwigo setup

# Name of the big-bear-piwigo application
name: big-bear-piwigo
# Service definitions for the big-bear-piwigo application
services:
  # Service name: big-bear-piwigo
  # The `big-bear-piwigo` service definition
  big-bear-piwigo:
    # Name of the container
    container_name: big-bear-piwigo
    # Image to be used for the container
    image: linuxserver/piwigo:16.4.0
    # Container restart policy
    restart: unless-stopped
    # Environment variables
    environment:
      - PUID=1000 # User ID for the container
      - PGID=1000 # Group ID for the container
      - TZ=UTC # Timezone setting for the container
    # Volumes to be mounted to the container
    volumes:
      - /DATA/AppData/$AppID/config:/config # Configuration files
      - /DATA/AppData/$AppID/gallery:/gallery # Gallery files
    # Ports mapping between host and container
    ports:
      - "8080:80" # Mapping port 8080 of the host to port 80 of the container
    networks:
      - big_bear_piwigo_network
    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'
      volumes:
        - container: /config
          description:
            en_us: 'Container Path: /config'
        - container: /gallery
          description:
            en_us: 'Container Path: /gallery'
      ports:
        - container: "80"
          description:
            en_us: 'Container Port: 80'
  big-bear-piwigo-db:
    image: mariadb:10.6
    container_name: big-bear-piwigo-db
    environment:
      - MYSQL_ROOT_PASSWORD=3cf3f2c4-3415-4efe-b478-db7b6f0b9934 # Root password for MySQL
      - MYSQL_DATABASE=piwigo # Database name
      - MYSQL_USER=big_bear_piwigo # Database user
      - MYSQL_PASSWORD=358fac48-4beb-4027-9c11-840464aca400 # Database user password
    volumes:
      - /DATA/AppData/$AppID/mysql:/var/lib/mysql # Persist database data
    restart: unless-stopped
    networks:
      - big_bear_piwigo_network
    x-casaos:
      envs:
        - 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/lib/mysql
          description:
            en_us: 'Container Path: /var/lib/mysql'
# Network definition for the big-bear-piwigo application
networks:
  big_bear_piwigo_network:
    driver: bridge # Defines the network driver to be used (bridge)
x-casaos:
  # Supported CPU architectures for this application
  architectures:
    - amd64
    - arm64
  # Main service for this application
  main: big-bear-piwigo
  # Detailed description for the application
  description:
    en_us: Piwigo is a photo gallery software for the web that comes with powerful features to publish and manage your collection of pictures.
  # Brief tagline for the application
  tagline:
    en_us: Piwigo
  # Developer's information
  developer: piwigo
  # Author of this particular configuration
  author: BigBearTechWorld
  # Icon URL for the application
  icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/piwigo.png
  # Thumbnail image for the application (if any)
  thumbnail: ""
  # Installation tips
  tips:
    before_install:
      en_us: |
        Before you install read this: https://community.bigbeartechworld.com/t/added-piwigo-to-bigbearcasaos/1133#documentation-3
  # Title for the application
  title:
    en_us: Piwigo
  # Category under which the application falls
  category: BigBearCasaOS
  # Default port mapping for the application
  port_map: "8080"
