Skip to content

ks6088ts-labs/azure-ai-services-solutions

Repository files navigation

test docker docker-release

azure-ai-services-solutions

This repository contains a collection of solutions that leverage Azure AI services.

Prerequisites

Development instructions

Local development

Use Makefile to run the project locally.

# help
make

# install dependencies for development
make install-deps-dev

# run tests
make test

# run CI tests
make ci-test

Docker development

# build docker image
make docker-build

# run docker container
make docker-run

# run CI tests in docker container
make ci-test-docker

Run local test

Currently almost all tests won't run on CI because it consumes Azure resources. To run the tests locally, follow the steps below.

# Run test if RUN_TEST is defined
export RUN_TEST=1

make test

Deployment instructions

Docker compose

Docker compose is used to run the services locally. Refer to the following steps to run the services. See the actual implementation in the compose.yaml file.

# Create environment files for each service
cp {NAME}.env.sample {NAME}.env

# Build and run the services
docker compose up

Push docker image to Docker Hub

To publish the docker image to Docker Hub via GitHub Actions, you need to set the following secrets in the repository.

gh secret set DOCKERHUB_USERNAME --body $DOCKERHUB_USERNAME
gh secret set DOCKERHUB_TOKEN --body $DOCKERHUB_TOKEN

Deploy Azure Functions

To deploy the Azure Functions, run the following script.

# Deploy the Azure Functions
sh ./scripts/deploy-azure-functions.sh

# Destroy the Azure Functions
sh ./scripts/destroy-azure-functions.sh