services:
  backend:
    image: ouijdaneim/rg-backend:latest
    build:
      context: ./public/backend
      dockerfile: ./DockerfileRG.backend
    container_name: rg-backend
    hostname: backend
    ports:
      - "8020:3005"
    environment:
      - TZ=Europe/Paris  # 🔥 Ajout du timezone
    networks:
      - rg-network
    restart: unless-stopped
    extra_hosts:
      - "host.docker.internal:host-gateway"

  frontend:
    image: ouijdaneim/rg-frontend:latest
    build:
      context: .
      dockerfile: ./DockerfileRG.frontend
    container_name: rg-frontend
    hostname: frontend
    ports:
      - "3020:81"
    environment:
      - VITE_API_URL=http://backend:3005
      - TZ=Europe/Paris  # 🔥 Ajout du timezone
    networks:
      - rg-network
    depends_on:
      - backend
    restart: unless-stopped

networks:
  rg-network:
    driver: bridge
