Sign inSign up

farshadbayat/erp-backend-monolithic:compose-latest

Manifest digest

sha256:405ebef78aa6ccfcf9a54c0c544dbaeca85a01187af8a3df3db1b2888fc2f9c1

Last pushed

3 days by farshadbayat

Type

Compose

Manifest digest

sha256:405ebef78aa6ccfcf9a54c0c544dbaeca85a01187af8a3df3db1b2888fc2f9c1

Compose file content

name: erp-modular-workspace

x-api-environment: &api-environment
  ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Production}
  ASPNETCORE_URLS: http://+:8080
  ASPNETCORE_HTTP_PORTS: 8080

x-erp-db: &erp-db "Server=sqlserver,1433;Database=FG-ERP;Integrated Security=False;User ID=sa;Password=${MSSQL_SA_PASSWORD:-Securet@~1};TrustServerCertificate=True;MultipleActiveResultSets=true"
x-cms-db: &cms-db "Server=sqlserver,1433;Database=FG-CMS;Integrated Security=False;User ID=sa;Password=${MSSQL_SA_PASSWORD:-Securet@~1};TrustServerCertificate=True;MultipleActiveResultSets=true"
x-circle-db: &circle-db "Server=sqlserver,1433;Database=FG-ERP;Integrated Security=False;User ID=sa;Password=${MSSQL_SA_PASSWORD:-Securet@~1};TrustServerCertificate=True;MultipleActiveResultSets=true"

services:
  sqlserver:
    image: mcr.microsoft.com/mssql/server:2022-latest
    platform: ${MSSQL_PLATFORM:-linux/amd64}
    restart: unless-stopped
    environment:
      ACCEPT_EULA: "Y"
      MSSQL_PID: Developer
      MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD:-Securet@~1}
    ports:
      - target: 1433
        published: "${MSSQL_PORT:-1433}"
        protocol: tcp
    volumes:
      - sqlserver_data:/var/opt/mssql
    healthcheck:
      test:
        [
          "CMD-SHELL",
          "bash -c '(/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P \"$${MSSQL_SA_PASSWORD}\" -C -Q \"SELECT 1\" || /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P \"$${MSSQL_SA_PASSWORD}\" -Q \"SELECT 1\") >/dev/null 2>&1'"
        ]
      interval: 10s
      timeout: 5s
      retries: 30
      start_period: 30s

  identity:
    image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_IMAGE_NAMESPACE:?Set DOCKER_IMAGE_NAMESPACE}/${DOCKER_IMAGE_REPOSITORY:-erp-backend-monolithic}:identity-${IMAGE_TAG:-latest}"
    restart: unless-stopped
    environment:
      <<: *api-environment
      ConnectionStrings__ApplicationDbContext: *erp-db
    expose:
      - "8080"
    depends_on:
      sqlserver:
        condition: service_healthy

  file-repository:
    image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_IMAGE_NAMESPACE:?Set DOCKER_IMAGE_NAMESPACE}/${DOCKER_IMAGE_REPOSITORY:-erp-backend-monolithic}:file-repository-${IMAGE_TAG:-latest}"
    restart: unless-stopped
    environment:
      <<: *api-environment
      ConnectionStrings__ApplicationDbContext: *erp-db
      CoreSettings__BaseUrl: http://identity:8080
      DocumentRepository__PreferredProvider: Local
      DocumentRepository__LocalStorage__RootPath: Storage/file-repo
    expose:
      - "8080"
    volumes:
      - file_repository_storage:/app/Storage/file-repo
    depends_on:
      sqlserver:
        condition: service_healthy
      identity:
        condition: service_started

  warehouse:
    image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_IMAGE_NAMESPACE:?Set DOCKER_IMAGE_NAMESPACE}/${DOCKER_IMAGE_REPOSITORY:-erp-backend-monolithic}:warehouse-${IMAGE_TAG:-latest}"
    restart: unless-stopped
    environment:
      <<: *api-environment
      ConnectionStrings__ApplicationDbContext: *erp-db
      CoreSettings__BaseUrl: http://identity:8080
    expose:
      - "8080"
    depends_on:
      sqlserver:
        condition: service_healthy
      identity:
        condition: service_started

  content-management:
    image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_IMAGE_NAMESPACE:?Set DOCKER_IMAGE_NAMESPACE}/${DOCKER_IMAGE_REPOSITORY:-erp-backend-monolithic}:content-management-${IMAGE_TAG:-latest}"
    restart: unless-stopped
    environment:
      <<: *api-environment
      ConnectionStrings__ApplicationDbContext: *cms-db
      CoreSettings__BaseUrl: http://identity:8080
    expose:
      - "8080"
    depends_on:
      sqlserver:
        condition: service_healthy
      identity:
        condition: service_started

  workflow:
    image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_IMAGE_NAMESPACE:?Set DOCKER_IMAGE_NAMESPACE}/${DOCKER_IMAGE_REPOSITORY:-erp-backend-monolithic}:workflow-${IMAGE_TAG:-latest}"
    restart: unless-stopped
    environment:
      <<: *api-environment
      ConnectionStrings__ApplicationDbContext: *erp-db
      CoreSettings__BaseUrl: http://identity:8080
    expose:
      - "8080"
    depends_on:
      sqlserver:
        condition: service_healthy
      identity:
        condition: service_started

  my-circle:
    image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_IMAGE_NAMESPACE:?Set DOCKER_IMAGE_NAMESPACE}/${DOCKER_IMAGE_REPOSITORY:-erp-backend-monolithic}:my-circle-${IMAGE_TAG:-latest}"
    restart: unless-stopped
    environment:
      <<: *api-environment
      ConnectionStrings__ApplicationDbContext: *circle-db
      CoreSettings__BaseUrl: http://identity:8080
      RiskAnalysis__Enabled: ${RISK_ANALYSIS_ENABLED:-true}
      RiskAnalysis__ApiKey: ${OPENAI_API_KEY:-}
      RiskAnalysis__Model: ${OPENAI_RISK_MODEL:-gpt-5-mini}
      RiskAnalysis__Endpoint: ${OPENAI_RESPONSES_ENDPOINT:-https://api.openai.com/v1/responses}
      RiskAnalysis__ContextMessageCount: ${RISK_ANALYSIS_CONTEXT_MESSAGE_COUNT:-10}
      RiskAnalysis__MinimumConfidence: ${RISK_ANALYSIS_MINIMUM_CONFIDENCE:-0.70}
      RiskAnalysis__TimeoutSeconds: ${RISK_ANALYSIS_TIMEOUT_SECONDS:-30}
      RiskAnalysis__RetryCount: ${RISK_ANALYSIS_RETRY_COUNT:-3}
      RiskAnalysis__PollIntervalSeconds: ${RISK_ANALYSIS_POLL_INTERVAL_SECONDS:-5}
    expose:
      - "8080"
    depends_on:
      sqlserver:
        condition: service_healthy
      identity:
        condition: service_started

  api-gateway:
    image: "${DOCKER_REGISTRY:-docker.io}/${DOCKER_IMAGE_NAMESPACE:?Set DOCKER_IMAGE_NAMESPACE}/${DOCKER_IMAGE_REPOSITORY:-erp-backend-monolithic}:api-gateway-${IMAGE_TAG:-latest}"
    restart: unless-stopped
    environment:
      <<: *api-environment
      Cors__AllowedOrigins: ${CORS_ALLOWED_ORIGINS:-http://localhost:4500,http://localhost:4301,http://localhost:4302,http://localhost:4306,http://localhost:4307,http://localhost:4900,http://localhost:4100,http://localhost:4310,http://localhost:4200}
      CoreSettings__BaseUrl: http://identity:8080
      ReverseProxy__Clusters__CoreClusterV1__Destinations__CoreApi__Address: http://identity:8080/
      ReverseProxy__Clusters__FileRepoClusterV1__Destinations__CoreApi__Address: http://file-repository:8080/
      ReverseProxy__Clusters__WarehouseClusterV1__Destinations__destination1__Address: http://warehouse:8080/
      ReverseProxy__Clusters__ContentManagementClusterV1__Destinations__destination1__Address: http://content-management:8080/
      ReverseProxy__Clusters__WorkflowClusterV1__Destinations__destination1__Address: http://workflow:8080/
      ReverseProxy__Clusters__MyCircleClusterV1__Destinations__destination1__Address: http://my-circle:8080/
    ports:
      - target: 8080
        published: "${API_GATEWAY_HTTP_PORT:-5001}"
        protocol: tcp
    depends_on:
      identity:
        condition: service_started
      file-repository:
        condition: service_started
      warehouse:
        condition: service_started
      content-management:
        condition: service_started
      workflow:
        condition: service_started
      my-circle:
        condition: service_started

volumes:
  sqlserver_data:
    name: ${SQLSERVER_VOLUME_NAME:-erp_sqlserver_data}
  file_repository_storage:
    name: ${FILE_REPOSITORY_VOLUME_NAME:-erp_file_repository_storage}

Docker commands

docker compose -f oci://farshadbayat/erp-backend-monolithic:compose-latest up

Use the above command to pull and run the Compose file. Learn more⁠.

Images used

No images found
No images were found in the Compose file.