services:
  nginx:
    image: nginx:1.25-alpine
    ports:
      - "9082:80"
    volumes:
      - .:/var/www/html
      - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - php
    networks:
      - symfony_net

  php:
    build:
      context: ./docker/php
      args:
        USER_ID: ${UID:-1000}
        GROUP_ID: ${GID:-1000}
    volumes:
      - .:/var/www/html
      - phpstan_cache:/var/www/html/var/phpstan
    extra_hosts:
      - "host.docker.internal:host-gateway"
    depends_on:
      - mailpit
    networks:
      - symfony_net

  mailpit:
    image: axllent/mailpit:latest
    ports:
      - "9072:8025"
    networks:
      - symfony_net

  sqlite-web:
    image: coleifer/sqlite-web
    ports:
      - "9062:8080"
    volumes:
      - ./var/data:/data
    command: sqlite_web -H 0.0.0.0 -x /data/data_dev.db
    networks:
      - symfony_net

  node:
    image: node:22-alpine
    working_dir: /var/www/html
    volumes:
      - .:/var/www/html

networks:
  symfony_net:

volumes:
  phpstan_cache: