|
1 | | -# How to run |
2 | | - |
3 | | -## Docker |
4 | | - |
5 | | -```shell |
6 | | -# Build the Docker image (optional) |
7 | | -make docker-build DOCKER_IMAGE_COMPONENT=backend GIT_TAG=latest |
8 | | -make docker-build DOCKER_IMAGE_COMPONENT=frontend GIT_TAG=latest |
9 | | - |
10 | | -# Create environment files for each service |
11 | | -cp {NAME}.env.sample {NAME}.env |
12 | | - |
13 | | -# Run the Docker container for the backend |
14 | | -docker run --rm \ |
15 | | - --publish 8888:8888 \ |
16 | | - --volume ${PWD}/azure_ai_document_intelligence.env:/app/azure_ai_document_intelligence.env \ |
17 | | - --volume ${PWD}/azure_ai_vision.env:/app/azure_ai_vision.env \ |
18 | | - --volume ${PWD}/azure_event_grid.env:/app/azure_event_grid.env \ |
19 | | - --volume ${PWD}/azure_openai.env:/app/azure_openai.env \ |
20 | | - --volume ${PWD}/azure_storage_blob.env:/app/azure_storage_blob.env \ |
21 | | - --volume ${PWD}/azure_storage_queue.env:/app/azure_storage_queue.env \ |
22 | | - ks6088ts/azure-ai-services-solutions:backend-latest \ |
23 | | - python main.py backend \ |
24 | | - --port 8888 \ |
25 | | - --debug |
26 | | - |
27 | | -# Access the backend: http://localhost:8888 |
28 | | - |
29 | | -# Run ngrok to expose the backend (for testing purposes only) |
30 | | -ngrok http 8888 |
31 | | -NGROK_URL="<forwarding-url>" |
32 | | - |
33 | | -# Run the Docker container for the frontend |
34 | | -docker run --rm \ |
35 | | - --publish 8501:8501 \ |
36 | | - --volume ${PWD}/azure_ai_speech.env:/app/azure_ai_speech.env \ |
37 | | - ks6088ts/azure-ai-services-solutions:frontend-latest \ |
38 | | - streamlit run main.py --server.port=8501 --server.address=0.0.0.0 -- frontend \ |
39 | | - --solution-name sandbox \ |
40 | | - --backend-url ${NGROK_URL} \ |
41 | | - --debug |
42 | | - |
43 | | -# Access the frontend: http://localhost:8501 |
44 | | -``` |
45 | | - |
46 | 1 | # References |
47 | 2 |
|
48 | 3 | ## Common |
49 | 4 |
|
50 | 5 | - [Typer](https://typer.tiangolo.com/#installation) |
51 | 6 | - [Kiota > Generate tailored Python and PHP API clients for any API with Kiota](https://devblogs.microsoft.com/microsoft365dev/generate-tailored-python-and-php-api-clients-for-any-api-with-kiota/) |
52 | 7 | - [How to exclude multiple directories in pre-commit](https://stackoverflow.com/a/75560858) |
| 8 | +- [Docker Compose Quickstart](https://docs.docker.com/compose/gettingstarted/) |
| 9 | +- [Validating docker-compose yml file](https://stackoverflow.com/a/40158753) |
53 | 10 |
|
54 | 11 | ## Backend |
55 | 12 |
|
|
0 commit comments