version: '3.8'

services:
  app:
    build: .
    container_name: wiso-app
    ports:
      - "8080:80"
    environment:
      - DB_HOST=postgres
      - DB_PORT=5432
      - DB_NAME=wiso_db
      - DB_USER=wiso_user
      - DB_PASSWORD=your_secure_password
    depends_on:
      - postgres
    volumes:
      - .:/var/www/html
    networks:
      - wiso-network

  postgres:
    image: postgres:15-alpine
    container_name: wiso-postgres
    environment:
      - POSTGRES_DB=wiso_db
      - POSTGRES_USER=wiso_user
      - POSTGRES_PASSWORD=your_secure_password
    ports:
      - "5432:5432"
    volumes:
      - postgres_data:/var/lib/postgresql/data
    networks:
      - wiso-network

volumes:
  postgres_data:

networks:
  wiso-network:
    driver: bridge
