version: "3.9"

services:
  db:
    image: mariadb:10.11
    container_name: dv-db
    restart: unless-stopped
    environment:
      MYSQL_ROOT_PASSWORD: example
      MYSQL_DATABASE: testdb
      MYSQL_USER: test
      MYSQL_PASSWORD: test
    volumes:
      - ./db:/var/lib/mysql

  mc:
    image: itzg/minecraft-server:latest
    container_name: dv-mc
    restart: unless-stopped
    environment:
      EULA: "TRUE"
      MEMORY: "1G"
    ports:
      - "25565:25565"
    volumes:
      - ./mc-missing:/data   # <-- med vilje mangler denne

  nginx:
    image: nginx:latest
    container_name: dv-nginx
    restart: unless-stopped
    ports:
      - "8080:80"
    volumes:
      - ./logs:/var/log/nginx
