services:
  web:
    build:
      context: .
      dockerfile: .docker/Dockerfile
      #target: base
    ports:
      - 127.0.0.1:80:80
    environment:
       DRUSH_OPTIONS_URI: "http://localhost"
# runuser -u www-data -- bash

#    volumes:
#      - ./:/opt/drupal
#  olddb:
#    image: mariadb:5.5.64
#    environment:
#      MYSQL_ROOT_PASSWORD: root
#      MYSQL_DATABASE: drupal
#    volumes:
#      - ./db:/docker-entrypoint-initdb.d
  database:
    image: mariadb:10.4
    environment:
      MARIADB_ROOT_PASSWORD: "root"
      MARIADB_DATABASE: drupal
    volumes:
      - ./db:/docker-entrypoint-initdb.d
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    environment:
      PMA_HOST: database
    ports:
      - 8080:80
  cli:
    build:
      context: .
      dockerfile: .docker/Dockerfile
    user: "1000"
    environment:
       DRUSH_OPTIONS_URI: "http://localhost"
    command: exit 0
  node:
    image: node:18
    user: "1000"
    working_dir: /opt/drupal/web/themes/custom/biatorbagy
    volumes:
      - ./:/opt/drupal
    command: exit 0
#  init:
#    build: .docker
#    profiles: ["init"]
#    user: "www-data"
#    environment:
#       DRUSH_OPTIONS_URI: "http://localhost"
#    volumes:
#      - ./:/opt/drupal
#    command: .docker/install.sh
