
version: '3.9'
services:
  app:
    image: php:8.2-fpm
    container_name: saas_app
    working_dir: /var/www
    volumes:
      - ./backend:/var/www

  nginx:
    image: nginx:latest
    container_name: saas_nginx
    ports:
      - "80:80"
    volumes:
      - ./backend:/var/www
      - ./nginx/default.conf:/etc/nginx/conf.d/default.conf
    depends_on:
      - app

  mysql:
    image: mariadb:latest
    container_name: saas_mysql
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: saas
    ports:
      - "3306:3306"

  redis:
    image: redis:latest
    container_name: saas_redis
