services:

  ## Zero Trust Tunnel 
  cloudflare-webhosting:
    image: cloudflare/cloudflared:latest
    container_name: cloudflare_ss_hosting_ingress
    restart: unless-stopped
    command: tunnel run
    environment:
      - TUNNEL_TOKEN=$TUNNEL_TOKEN

  ## Database / Database Management
  mariadb_webhosting:
    image: linuxserver/mariadb
    container_name: mariadb_webhosting
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000
      - MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
    volumes:
      - /ss_webhosting/mariadb:/config

  phpmyadmin_webhosting:
    image: phpmyadmin
    container_name: phpmyadmin_webhosting
    restart: unless-stopped
    depends_on:
      - mariadb_webhosting
    environment:
      - PMA_HOST=mariadb_webhosting
      - PMA_PORT=3306

  ## Sites
  phlares_website:
    image: wordpress
    container_name: phlares_website
    restart: always
    environment:
      WORDPRESS_DB_HOST: mariadb_webhosting
      WORDPRESS_DB_USER: phlares
      WORDPRESS_DB_PASSWORD: $PHLARES_DB_PASS
      WORDPRESS_DB_NAME: phlares
    volumes:
      - /ss_webhosting/phlares_website:/var/www/html

  allthingsnd_website:
    image: wordpress
    container_name: allthingsnd_website
    restart: always
    environment:
      WORDPRESS_DB_HOST: mariadb_webhosting
      WORDPRESS_DB_USER: allthingsnd
      WORDPRESS_DB_PASSWORD: $ALLTHINGSND_DB_PASS
      WORDPRESS_DB_NAME: allthingsnd
    volumes:
      - /ss_webhosting/allthingsnd_website:/var/www/html


networks:
  default:
    name: dockers_default
    external: true