version: "3.9"

services:
  app:
    build: .
    container_name: portfolio-app
    volumes:
      - .:/var/www/html
    environment:
      - APP_ENV=local
      - APP_DEBUG=true
      - APP_URL=http://localhost
      - DB_CONNECTION=sqlite
      - DB_DATABASE=/var/www/html/database/database.sqlite
    networks:
      - appnet

  web:
    image: nginx:1.27-alpine
    container_name: portfolio-web
    ports:
      - "8080:80"
    volumes:
      - .:/var/www/html
      - ./docker/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
    depends_on:
      - app
    networks:
      - appnet

networks:
  appnet:
    driver: bridge


