services:
  database:
    image: mariadb:10.6.17
    volumes:
      - database:/var/lib/mysql
    environment:
      MYSQL_ROOT_PASSWORD: kohinos
      MYSQL_DATABASE: kohinos
      MYSQL_USER: kohinos
      MYSQL_PASSWORD: kohinos
    ports:
      - "3306:3306"

  server:
    build:
      context: .
      dockerfile: ./docker/server/Dockerfile
    user: ${DOCKER_USER_ID}
    env_file:
      - .env
    working_dir: /sources
    volumes:
      - ".:/sources"
    ports:
      - "8080:80"

  phpmyadmin:
    image: phpmyadmin:5-apache
    environment:
      PMA_HOST: database
    ports:
      - "8081:80"

volumes:
  database:
