Skip to content

Commit 9f3fef3

Browse files
authored
Merge pull request #231376 from laujan/update-docker-compose-yml
update docker yaml file
2 parents 19e51f1 + 1400778 commit 9f3fef3

File tree

1 file changed

+93
-93
lines changed

1 file changed

+93
-93
lines changed

articles/applied-ai-services/form-recognizer/containers/form-recognizer-container-install-run.md

Lines changed: 93 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: nitinme
77
ms.service: applied-ai-services
88
ms.subservice: forms-recognizer
99
ms.topic: how-to
10-
ms.date: 02/08/2023
10+
ms.date: 03/20/2023
1111
ms.author: lajanuar
1212
recommendations: false
1313
---
@@ -560,98 +560,98 @@ http {
560560

561561
2. The following code sample is a self-contained `docker compose` example to run Form Recognizer Layout, Label Tool, Custom API, and Custom Supervised 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.
562562

563-
```yml
564-
version: '3.3'
565-
services:
566-
nginx:
567-
image: nginx:alpine
568-
container_name: reverseproxy
569-
volumes:
570-
- ${NGINX_CONF_FILE}:/etc/nginx/nginx.conf
571-
ports:
572-
- "5000"
573-
rabbitmq:
574-
container_name: ${RABBITMQ_HOSTNAME}
575-
image: rabbitmq:3
576-
expose:
577-
- "5672"
578-
layout:
579-
container_name: azure-cognitive-service-layout
580-
image: mcr.microsoft.com/azure-cognitive-services/form-recognizer/layout
581-
depends_on:
582-
- rabbitmq
583-
environment:
584-
eula: accept
585-
key: ${FORM_RECOGNIZER_KEY}
586-
billing: ${FORM_RECOGNIZER_ENDPOINT_URI}
587-
Queue:RabbitMQ:HostName: ${RABBITMQ_HOSTNAME}
588-
Queue:RabbitMQ:Port: ${RABBITMQ_PORT}
589-
Logging:Console:LogLevel:Default: Information
590-
SharedRootFolder: /shared
591-
Mounts:Shared: /shared
592-
Mounts:Output: /logs
593-
volumes:
594-
- type: bind
595-
source: ${SHARED_MOUNT_PATH}
596-
target: /shared
597-
- type: bind
598-
source: ${OUTPUT_MOUNT_PATH}
599-
target: /logs
600-
expose:
601-
- "5000"
602-
603-
custom-api:
604-
container_name: azure-cognitive-service-custom-api
605-
image: mcr.microsoft.com/azure-cognitive-services/form-recognizer/custom-api
606-
restart: always
607-
depends_on:
608-
- rabbitmq
609-
environment:
610-
eula: accept
611-
key: ${FORM_RECOGNIZER_KEY}
612-
billing: ${FORM_RECOGNIZER_ENDPOINT_URI}
613-
Logging:Console:LogLevel:Default: Information
614-
Queue:RabbitMQ:HostName: ${RABBITMQ_HOSTNAME}
615-
Queue:RabbitMQ:Port: ${RABBITMQ_PORT}
616-
SharedRootFolder: /shared
617-
Mounts:Shared: /shared
618-
Mounts:Output: /logs
619-
volumes:
620-
- type: bind
621-
source: ${SHARED_MOUNT_PATH}
622-
target: /shared
623-
- type: bind
624-
source: ${OUTPUT_MOUNT_PATH}
625-
target: /logs
626-
expose:
627-
- "5000"
628-
629-
custom-supervised:
630-
container_name: azure-cognitive-service-custom-supervised
631-
image: mcr.microsoft.com/azure-cognitive-services/form-recognizer/custom-supervised
632-
restart: always
633-
depends_on:
634-
- rabbitmq
635-
environment:
636-
eula: accept
637-
key: ${FORM_RECOGNIZER_KEY}
638-
billing: ${FORM_RECOGNIZER_ENDPOINT_URI}
639-
CustomFormRecognizer:ContainerPhase: All
640-
CustomFormRecognizer:LayoutAnalyzeUri: http://azure-cognitive-service-layout:5000/formrecognizer/v2.1/layout/analyze
641-
Logging:Console:LogLevel:Default: Information
642-
Queue:RabbitMQ:HostName: ${RABBITMQ_HOSTNAME}
643-
Queue:RabbitMQ:Port: ${RABBITMQ_PORT}
644-
SharedRootFolder: /shared
645-
Mounts:Shared: /shared
646-
Mounts:Output: /logs
647-
volumes:
648-
- type: bind
649-
source: ${SHARED_MOUNT_PATH}
650-
target: /shared
651-
- type: bind
652-
source: ${OUTPUT_MOUNT_PATH}
653-
target: /logs
654-
```
563+
```yml
564+
version: '3.3'
565+
services:
566+
nginx:
567+
image: nginx:alpine
568+
container_name: reverseproxy
569+
volumes:
570+
- ${NGINX_CONF_FILE}:/etc/nginx/nginx.conf
571+
ports:
572+
- "5000:5000"
573+
rabbitmq:
574+
container_name: ${RABBITMQ_HOSTNAME}
575+
image: rabbitmq:3
576+
expose:
577+
- "5672"
578+
layout:
579+
container_name: azure-cognitive-service-layout
580+
image: mcr.microsoft.com/azure-cognitive-services/form-recognizer/layout
581+
depends_on:
582+
- rabbitmq
583+
environment:
584+
eula: accept
585+
apikey: ${FORM_RECOGNIZER_KEY}
586+
billing: ${FORM_RECOGNIZER_ENDPOINT_URI}
587+
Queue:RabbitMQ:HostName: ${RABBITMQ_HOSTNAME}
588+
Queue:RabbitMQ:Port: ${RABBITMQ_PORT}
589+
Logging:Console:LogLevel:Default: Information
590+
SharedRootFolder: /shared
591+
Mounts:Shared: /shared
592+
Mounts:Output: /logs
593+
volumes:
594+
- type: bind
595+
source: ${SHARED_MOUNT_PATH}
596+
target: /shared
597+
- type: bind
598+
source: ${OUTPUT_MOUNT_PATH}
599+
target: /logs
600+
expose:
601+
- "5000"
602+
603+
custom-api:
604+
container_name: azure-cognitive-service-custom-api
605+
image: mcr.microsoft.com/azure-cognitive-services/form-recognizer/custom-api
606+
restart: always
607+
depends_on:
608+
- rabbitmq
609+
environment:
610+
eula: accept
611+
apikey: ${FORM_RECOGNIZER_KEY}
612+
billing: ${FORM_RECOGNIZER_ENDPOINT_URI}
613+
Logging:Console:LogLevel:Default: Information
614+
Queue:RabbitMQ:HostName: ${RABBITMQ_HOSTNAME}
615+
Queue:RabbitMQ:Port: ${RABBITMQ_PORT}
616+
SharedRootFolder: /shared
617+
Mounts:Shared: /shared
618+
Mounts:Output: /logs
619+
volumes:
620+
- type: bind
621+
source: ${SHARED_MOUNT_PATH}
622+
target: /shared
623+
- type: bind
624+
source: ${OUTPUT_MOUNT_PATH}
625+
target: /logs
626+
expose:
627+
- "5000"
628+
629+
custom-supervised:
630+
container_name: azure-cognitive-service-custom-supervised
631+
image: mcr.microsoft.com/azure-cognitive-services/form-recognizer/custom-supervised
632+
restart: always
633+
depends_on:
634+
- rabbitmq
635+
environment:
636+
eula: accept
637+
apikey: ${FORM_RECOGNIZER_KEY}
638+
billing: ${FORM_RECOGNIZER_ENDPOINT_URI}
639+
CustomFormRecognizer:ContainerPhase: All
640+
CustomFormRecognizer:LayoutAnalyzeUri: http://azure-cognitive-service-layout:5000/formrecognizer/v2.1/layout/analyze
641+
Logging:Console:LogLevel:Default: Information
642+
Queue:RabbitMQ:HostName: ${RABBITMQ_HOSTNAME}
643+
Queue:RabbitMQ:Port: ${RABBITMQ_PORT}
644+
SharedRootFolder: /shared
645+
Mounts:Shared: /shared
646+
Mounts:Output: /logs
647+
volumes:
648+
- type: bind
649+
source: ${SHARED_MOUNT_PATH}
650+
target: /shared
651+
- type: bind
652+
source: ${OUTPUT_MOUNT_PATH}
653+
target: /logs
654+
```
655655
656656
### Ensure the service is running
657657

0 commit comments

Comments
 (0)