version: "3.8"

services:

  piwigo:
    image: linuxserver/piwigo:14.5.0
    ports:
      - "8080:80"
    volumes:
      - ./data/config:/config
      - ./data/gallery:/gallery
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
    depends_on:
      - mysql
    restart: unless-stopped

  mysql:
    image: mysql:8.0-debian
    ports:
      - "3306:3306"
    volumes:
      - ./data/mysql:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=root
      - MYSQL_DATABASE=piwigo
      - MYSQL_USER=piwigo
      - MYSQL_PASSWORD=piwigo
    restart: unless-stopped
