version: "3"

services:

  # --- MariaDB
  linkacedb:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: linkace_mariadb
    restart: unless-stopped
    command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
    environment:
      - MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
      - MYSQL_USER=${DB_USERNAME}
      - MYSQL_PASSWORD=${DB_PASSWORD}
      - MYSQL_DATABASE=${DB_DATABASE}
    volumes:
      - /gurulandia/data/docker/linkace/db:/config
  
  adminer_linkace:
    image: adminer:latest
    container_name: adminer
    environment:
      ADMINER_DEFAULT_SERVER: linkacedb
    restart: unless-stopped    
    ports:
      - 7779:8080  
  
  # --- LinkAce Image with PHP and nginx
  linkace:
    image: linkace/linkace:simple
    container_name: linkace
    restart: unless-stopped
    depends_on:
      - linkacedb
    ports:
      - "0.0.0.0:53003:80"
      #- "0.0.0.0:443:443"
    volumes:
      - /gurulandia/data/docker/linkace/.env:/app/.env
      - /gurulandia/data/docker/linkace/backups:/app/storage/app/backups      
      - linkace_logs:/app/storage/logs
      # Remove the hash of the following line if you want to use HTTPS for this container
      #- ./nginx-ssl.conf:/etc/nginx/conf.d/default.conf:ro
      #- /path/to/your/ssl/certificates:/certs:ro

volumes:
  linkace_logs:
