version: "3"

services:
  servasdb:
    image: mariadb:10.7.3
    container_name: servas_mariadb
    restart: unless-stopped
    command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_bin
    environment:
      - MARIADB_ROOT_PASSWORD=${DB_PASSWORD}
      - MARIADB_USER=${DB_USERNAME}
      - MARIADB_PASSWORD=${DB_PASSWORD}
      - MARIADB_DATABASE=${DB_DATABASE}
    volumes:
#      - servas-db-data:/var/lib/mysql
       - /gurulandia/data/docker/servas/db:/var/lib/mysql
  adminer_servas:
    image: adminer:latest
    container_name: adminer
    environment:
      ADMINER_DEFAULT_SERVER: servasdb
    restart: unless-stopped
    ports:
      - 7776:8080  

  servas:
    image: beromir/servas
    container_name: servas
    restart: unless-stopped
    depends_on:
      - servasdb
    ports:
      - "9030:80"
    volumes:
      - /gurulandia/data/docker/servas/.env:/var/www/html/.env      

# volumes:
  # servas-db-data: