services:
  nginx:
    image: nginx:alpine
    container_name: aegisone-php-nginx
    network_mode: host
    volumes:
      - ./src:/var/www/html:ro
      - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
    depends_on:
      - php
    restart: unless-stopped

  php:
    build:
      context: .
      network: host
    container_name: aegisone-php-fpm
    network_mode: host
    volumes:
      - ./src:/var/www/html
    environment:
      DB_TYPE: pgsql
      DB_HOST: localhost
      DB_PORT: "5432"
      DB_NAME: aegisone
      DB_USER: aegisone
      DB_PASS: aegisone_pass
    restart: unless-stopped
