version: "3"

services:

  # --- MariaDB
  db:
    image: docker.io/library/mariadb:11.2
    restart: unless-stopped
    environment:
      - MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
      - MYSQL_USER=${DB_USERNAME}
      - MYSQL_PASSWORD=${DB_PASSWORD}
      - MYSQL_DATABASE=${DB_DATABASE}
    volumes:
      - db:/var/lib/mysql

  # --- LinkAce Image with PHP and nginx
  app:
    image: docker.io/linkace/linkace
    restart: unless-stopped
    depends_on:
      - db
    ports:
      - "0.0.0.0:80:80"
    volumes:
      - ./backups:/app/storage/app/backups
      - linkace_logs:/app/storage/logs

volumes:
  linkace_logs:
  db:
    driver: local
