services:
  steelforesight-cms:
    build:
      context: ./panel
      dockerfile: Dockerfile
    container_name: steelforesight-cms
    restart: always
    ports:
      - 3001:3001
    environment:
      - PORT=3001
      - NODE_ENV=production
      - JWT_SECRET=sxskB!Mq2*GkwWm?qDi9JwJCA0|CAk{y%o3[uj.+LM^nayqiS>f_yy:B0c?),:y?@&Yvz0Bwy@p8n%{j[y+J#J
      - LIARA_ENDPOINT=s3.ir-thr-at1.arvanstorage.ir
      - LIARA_BUCKET=steelforesight
      - LIARA_ACCESS_KEY=325f8646-d2e3-4c46-b399-d1f0184beb24
      - LIARA_SECRET_KEY=47dfe66e3d24c2421640e6c1c9b09a53989dfcd755430e1570344cfc18485cda
      - ADMIN_USERNAME=admin
      - ADMIN_PASSWORD=elidonbe85kgkg@
      - MEDIA_BASE=/media
      - PUBLIC_ORIGIN=http://94.101.186.198:7860
      - PANEL_BASE_URL=http://94.101.186.198:3001
      - DATABASE_URL=postgresql://user:d1ph12poyhd1o2pDASd2jp2dnbcba@app-postgres-1:5432/steelforesight
      - DATABASE_SSL=disable
      - KAVENEGAR_API_KEY=4C535063775043745559427769372B6F592B33524238345A6A494E4F456546417931697934304A734F6F6F3D
      - SSO_SECRET=wSoNQxqlABZylZpXfuvUauUtaWXlNiJUxiOB9lBXOj8
      - AI_BASE_URL=https://ai.liara.ir/api/68eb653bb55873971e0d46d6/v1
      - AI_API_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkiOiI2YTQ1MDc1MjViNTk5MGNhZWMzZjY2OWMiLCJ0eXBlIjoiYWlfa2V5IiwiaWF0IjoxNzgyOTA4NzU0fQ.B6snXRTQonKbNEyCi-8YtgKIfkYEaVvkMFgal9S7xNg
      - AI_MODEL=google/gemini-3.5-flash
      - ALLOWED_ORIGINS=http://localhost:5173,http://localhost:3000,http://localhost:3001,http://94.101.186.198:7860,http://94.101.186.198:3001,https://steelforesight.ir,https://api.steelforesight.ir,https://steelforesight.liara.run,https://cms-steelforesight.liara.run
    networks:
      - sf-network

  steelforesight-frontend:
    build:
      context: ./frontend
      dockerfile: Dockerfile
      args:
        - VITE_PANEL_API=
    container_name: steelforesight-frontend
    restart: always
    ports:
      - 7860:7860
    depends_on:
      - steelforesight-cms
    networks:
      - sf-network

networks:
  sf-network:
    driver: bridge
