Skip to content

Commit 8bc8d1a

Browse files
authored
Update install-run.md
1 parent a5f44c8 commit 8bc8d1a

File tree

1 file changed

+100
-8
lines changed

1 file changed

+100
-8
lines changed

articles/ai-services/document-intelligence/containers/install-run.md

Lines changed: 100 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,13 @@ services:
272272
- AzureCognitiveServiceReadHost=http://azure-cognitive-service-read:5000
273273
ports:
274274
- "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}
282282
```
283283
284284
Now, you can start the service with the [**docker compose**](https://docs.docker.com/compose/) command:
@@ -345,6 +345,7 @@ services:
345345
- apiKey={FORM_RECOGNIZER_KEY}
346346
```
347347
348+
348349
### [Custom](#tab/custom)
349350
350351
In addition to the [prerequisites](#prerequisites), you need to do the following to process a custom document:
@@ -443,6 +444,10 @@ http {
443444
proxy_pass http://docker-custom/swagger;
444445
}
445446
447+
location /api-docs {
448+
proxy_pass http://docker-custom/api-docs;
449+
}
450+
446451
location /formrecognizer/documentModels/prebuilt-layout {
447452
proxy_set_header Host $host:$server_port;
448453
proxy_set_header Referer $scheme://$host:$server_port;
@@ -491,7 +496,93 @@ http {
491496
}
492497
493498
```
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.
494505

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"
495586
#### Create a **docker compose** file
496587

497588
1. Name this file **docker-compose.yml**
@@ -559,7 +650,7 @@ services:
559650
560651
studio:
561652
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
563654
environment:
564655
ONPREM_LOCALFILE_BASEPATH: /onprem_folder
565656
STORAGE_DATABASE_CONNECTION_STRING: /onprem_db/Application.db
@@ -575,6 +666,7 @@ services:
575666
user: "1000:1000" # echo $(id -u):$(id -g)
576667
577668
```
669+
::: moniker-end
578670

579671
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.
580672

0 commit comments

Comments
 (0)