# Configuration for big-bear-wordpress setup

# Name of the big-bear-wordpress application
name: big-bear-wordpress
# Service definitions for the wordpress application
services:
  # Service definition for the main application
  app:
    # Docker image to use for the application
    image: wordpress:6.9.4
    # Port mapping for the application
    ports:
      - 8080:80
    # Environment variables for the application
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: casaos
      WORDPRESS_DB_PASSWORD: casaos
      WORDPRESS_DB_NAME: wordpress
    # Volume mapping for the application
    volumes:
      - /DATA/AppData/$AppID/html:/var/www/html
    # Service dependencies for the application
    depends_on:
      - db
    x-casaos:
      envs:
        - container: WORDPRESS_DB_HOST
          description:
            en_us: 'Container Variable: WORDPRESS_DB_HOST'
        - container: WORDPRESS_DB_USER
          description:
            en_us: 'Container Variable: WORDPRESS_DB_USER'
        - container: WORDPRESS_DB_PASSWORD
          description:
            en_us: 'Container Variable: WORDPRESS_DB_PASSWORD'
        - container: WORDPRESS_DB_NAME
          description:
            en_us: 'Container Variable: WORDPRESS_DB_NAME'
      volumes:
        - container: /var/www/html
          description:
            en_us: 'Container Path: /var/www/html'
      ports:
        - container: "80"
          description:
            en_us: 'Container Port: 80'
  # Service definition for the database
  db:
    # Docker image to use for the database
    image: mysql:5.7
    # Environment variables for the database
    environment:
      MYSQL_DATABASE: wordpress
      MYSQL_USER: casaos
      MYSQL_PASSWORD: casaos
      MYSQL_ROOT_PASSWORD: casaos
    # Volume mapping for the database
    volumes:
      - /DATA/AppData/$AppID/mysql:/var/lib/mysql
    x-casaos:
      envs:
        - 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: MYSQL_ROOT_PASSWORD
          description:
            en_us: 'Container Variable: MYSQL_ROOT_PASSWORD'
      volumes:
        - container: /var/lib/mysql
          description:
            en_us: 'Container Path: /var/lib/mysql'
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: Initially started as a blogging tool in 2003, it has evolved into a highly flexible CMS that powers over 40% of the web (as of my last training data in 2022).
  # Brief tagline for the application
  tagline:
    en_us: WordPress
  # Developer's information
  developer: Automattic
  # Author of this particular configuration
  author: BigBearTechWorld
  # Icon URL for the application
  icon: https://cdn.jsdelivr.net/gh/selfhst/icons/png/wordpress.png
  # Thumbnail image for the application (if any)
  thumbnail: ""
  # Title for the application
  title:
    en_us: WordPress
  # Category under which the application falls
  category: BigBearCasaOS
  # Default port mapping for the application
  port_map: "8080"
