services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: motosolution_app
    restart: unless-stopped
    working_dir: /var/www/html
    volumes:
      - ./:/var/www/html
      - ./storage:/var/www/html/storage
    environment:
      - APP_ENV=production
      - APP_DEBUG=false
      - DB_CONNECTION=sqlite
      - DB_DATABASE=/var/www/html/database/database.sqlite
    networks:
      - motosolution_net

  web:
    image: nginx:alpine
    container_name: motosolution_web
    restart: unless-stopped
    ports:
      - "8080:80"
    volumes:
      - ./:/var/www/html
      - ./docker/nginx.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - app
    networks:
      - motosolution_net

networks:
  motosolution_net:
    driver: bridge
