@@ -272,13 +272,13 @@ services:
272
272
- AzureCognitiveServiceReadHost=http://azure-cognitive-service-read:5000
273
273
ports :
274
274
- " 5000:5050"
275
- azure-cognitive-service-read :
276
- container_name : azure-cognitive-service-read
277
- image : mcr.microsoft.com/azure-cognitive-services/form-recognizer/read-3.1
278
- environment :
279
- - EULA=accept
280
- - billing={FORM_RECOGNIZER_ENDPOINT_URI}
281
- - apiKey={FORM_RECOGNIZER_KEY}
275
+ azure-cognitive-service-read :
276
+ container_name : azure-cognitive-service-read
277
+ image : mcr.microsoft.com/azure-cognitive-services/form-recognizer/read-3.1
278
+ environment :
279
+ - EULA=accept
280
+ - billing={FORM_RECOGNIZER_ENDPOINT_URI}
281
+ - apiKey={FORM_RECOGNIZER_KEY}
282
282
` ` `
283
283
284
284
Now, you can start the service with the [**docker compose**](https://docs.docker.com/compose/) command:
@@ -345,6 +345,7 @@ services:
345
345
- apiKey={FORM_RECOGNIZER_KEY}
346
346
` ` `
347
347
348
+
348
349
### [Custom](#tab/custom)
349
350
350
351
In addition to the [prerequisites](#prerequisites), you need to do the following to process a custom document:
@@ -443,6 +444,10 @@ http {
443
444
proxy_pass http://docker-custom/swagger;
444
445
}
445
446
447
+ location /api-docs {
448
+ proxy_pass http://docker-custom/api-docs;
449
+ }
450
+
446
451
location /formrecognizer/documentModels/prebuilt-layout {
447
452
proxy_set_header Host $host:$server_port;
448
453
proxy_set_header Referer $scheme://$host:$server_port;
@@ -491,7 +496,93 @@ http {
491
496
}
492
497
493
498
` ` `
499
+ :::moniker range="<=doc-intel-3.0.0"
500
+ # ### Create a **docker compose** file
501
+
502
+ 1. Name this file **docker-compose.yml**
503
+
504
+ 2. The following code sample is a self-contained `docker compose` example to run Document Intelligence Layout, Studio, and Custom template containers together. With `docker compose`, you use a YAML file to configure your application's services. Then, with `docker-compose up` command, you create and start all the services from your configuration.
494
505
506
+ ` ` ` yml
507
+ version: '3.3'
508
+ services:
509
+ nginx:
510
+ image: nginx:alpine
511
+ container_name: reverseproxy
512
+ depends_on:
513
+ - layout
514
+ - custom-template
515
+ volumes:
516
+ - ${NGINX_CONF_FILE}:/etc/nginx/nginx.conf
517
+ ports:
518
+ - "5000:5000"
519
+ layout:
520
+ container_name: azure-cognitive-service-layout
521
+ image: mcr.microsoft.com/azure-cognitive-services/form-recognizer/layout-3.0:latest
522
+ environment:
523
+ eula: accept
524
+ apikey: ${FORM_RECOGNIZER_KEY}
525
+ billing: ${FORM_RECOGNIZER_ENDPOINT_URI}
526
+ Logging:Console:LogLevel:Default: Information
527
+ SharedRootFolder: /share
528
+ Mounts:Shared: /share
529
+ Mounts:Output: /logs
530
+ volumes:
531
+ - type: bind
532
+ source: ${SHARED_MOUNT_PATH}
533
+ target: /share
534
+ - type: bind
535
+ source: ${OUTPUT_MOUNT_PATH}
536
+ target: /logs
537
+ expose:
538
+ - "5000"
539
+
540
+ custom-template:
541
+ container_name: azure-cognitive-service-custom-template
542
+ image: mcr.microsoft.com/azure-cognitive-services/form-recognizer/custom-template-3.0:latest
543
+ restart: always
544
+ depends_on:
545
+ - layout
546
+ environment:
547
+ AzureCognitiveServiceLayoutHost: http://azure-cognitive-service-layout:5000
548
+ eula: accept
549
+ apikey: ${FORM_RECOGNIZER_KEY}
550
+ billing: ${FORM_RECOGNIZER_ENDPOINT_URI}
551
+ Logging:Console:LogLevel:Default: Information
552
+ SharedRootFolder: /share
553
+ Mounts:Shared: /share
554
+ Mounts:Output: /logs
555
+ volumes:
556
+ - type: bind
557
+ source: ${SHARED_MOUNT_PATH}
558
+ target: /share
559
+ - type: bind
560
+ source: ${OUTPUT_MOUNT_PATH}
561
+ target: /logs
562
+ expose:
563
+ - "5000"
564
+
565
+ studio:
566
+ container_name: form-recognizer-studio
567
+ image: mcr.microsoft.com/azure-cognitive-services/form-recognizer/studio:3.0
568
+ environment:
569
+ ONPREM_LOCALFILE_BASEPATH: /onprem_folder
570
+ STORAGE_DATABASE_CONNECTION_STRING: /onprem_db/Application.db
571
+ volumes:
572
+ - type: bind
573
+ source: ${FILE_MOUNT_PATH} # path to your local folder
574
+ target: /onprem_folder
575
+ - type: bind
576
+ source: ${DB_MOUNT_PATH} # path to your local folder
577
+ target: /onprem_db
578
+ ports:
579
+ - "5001:5001"
580
+ user: "1000:1000" # echo $(id -u):$(id -g)
581
+
582
+ ` ` `
583
+ :: : moniker-end
584
+
585
+ :::moniker range=">=doc-intel-3.1.0"
495
586
# ### Create a **docker compose** file
496
587
497
588
1. Name this file **docker-compose.yml**
@@ -559,7 +650,7 @@ services:
559
650
560
651
studio:
561
652
container_name: form-recognizer-studio
562
- image: mcr.microsoft.com/azure-cognitive-services/form-recognizer/studio:3.0
653
+ image: mcr.microsoft.com/azure-cognitive-services/form-recognizer/studio:3.1
563
654
environment:
564
655
ONPREM_LOCALFILE_BASEPATH: /onprem_folder
565
656
STORAGE_DATABASE_CONNECTION_STRING: /onprem_db/Application.db
@@ -575,6 +666,7 @@ services:
575
666
user: "1000:1000" # echo $(id -u):$(id -g)
576
667
577
668
` ` `
669
+ :: : moniker-end
578
670
579
671
The custom template container and Layout container can use Azure Storage queues or in memory queues. The `Storage:ObjectStore:AzureBlob:ConnectionString` and `queue:azure:connectionstring` environment variables only need to be set if you're using Azure Storage queues. When running locally, delete these variables.
580
672
0 commit comments