version: '3.8' services: db_stage: image: postgres:16-alpine container_name: canino_db_stage restart: always environment: POSTGRES_USER: canino_stage POSTGRES_PASSWORD: caninopassword_stage POSTGRES_DB: caninodb_stage volumes: - canina_stage_db:/var/lib/postgresql/data networks: - traefik_public redis_stage: image: redis:7-alpine container_name: canino_redis_stage restart: always networks: - traefik_public backend_stage: build: context: ./backend dockerfile: Dockerfile container_name: canino_backend_stage restart: always environment: - DATABASE_URL=postgresql://canino_stage:caninopassword_stage@db_stage:5432/caninodb_stage?schema=public - REDIS_HOST=redis_stage - REDIS_PORT=6379 - PORT=3000 - PRISMA_SCHEMA_ENGINE_BINARY=/app/node_modules/@prisma/engines/schema-engine-linux-musl-openssl-3.0.x - PRISMA_QUERY_ENGINE_LIBRARY=/app/node_modules/@prisma/engines/libquery_engine-linux-musl-openssl-3.0.x.so.node volumes: - canina_stage_uploads:/app/uploads labels: - "traefik.enable=true" - "traefik.http.routers.canina-api-stage.rule=Host(`stageapi.canina.ir`)" - "traefik.http.routers.canina-api-stage.entrypoints=websecure" - "traefik.http.routers.canina-api-stage.tls=true" - "traefik.http.services.canina-api-stage.loadbalancer.server.port=3000" depends_on: - db_stage - redis_stage networks: - traefik_public frontend_stage: build: context: . dockerfile: Dockerfile args: NEXT_PUBLIC_API_URL: "https://stageapi.canina.ir/api" VITE_API_URL: "https://stageapi.canina.ir" container_name: canino_frontend_stage restart: always labels: - "traefik.enable=true" - "traefik.http.routers.canina-stage.rule=Host(`stage.canina.ir`) || Host(`stageadmin.canina.ir`)" - "traefik.http.routers.canina-stage.entrypoints=websecure" - "traefik.http.routers.canina-stage.tls=true" - "traefik.http.routers.canina-stage.middlewares=staging-robots-headers" - "traefik.http.middlewares.staging-robots-headers.headers.customresponseheaders.X-Robots-Tag=noindex, nofollow, nosnippet, noarchive" - "traefik.http.services.canina-stage.loadbalancer.server.port=8080" depends_on: - backend_stage networks: - traefik_public networks: traefik_public: external: true volumes: canina_stage_db: canina_stage_uploads: