Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dockerfile and docker-compose support #184

Merged
merged 16 commits into from
Aug 25, 2023
Merged

Conversation

huangyingting
Copy link
Contributor

@huangyingting huangyingting commented Aug 16, 2023

Motivation and Context

Adding docker support to deploy into kubernetes or run in local docker environment

Description

Adding docker support to deploy into kubernetes or run in local docker environment.
A new folder "docker" created under root, to build images, from root directory, run
docker build -f docker/webapi/Dockerfile -t repo/chat-copilot-webapi
docker build -f docker/webapi/Dockerfile -t repo/chat-copilot-webapp
A docker-compose file is also created to start whole environment, under docker directory, just run
docker-compose up, it uses .env file to read environment variables, so make sure webapi and webapp directory has .env file

the manifests to deply chat-copilot into kubernetes environment can be found here
https://github.com/huangyingting/flux2-gitops/tree/main/apps/base/chat-copilot

Contribution Checklist

@github-actions github-actions bot added the github actions Pull requests that update GitHub Actions code label Aug 16, 2023
Copy link
Contributor Author

@huangyingting huangyingting left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is not convient to import dev ssl certificate into another container, so we need to set Kestrel__Endpoints__Http__Url=http://0.0.0.0:8080
environment variable, the docker-compose file needs have .env file in webapi directory, here is the example for .env content

AIService__Endpoint=
AIService__Key=
Authorization__Type=
Authorization__AzureAd__TenantId=
Authorization__AzureAd__ClientId=
Authorization__AzureAd__Audience=
Authorization__AzureAd__Scopes=access_as_user
Kestrel__Endpoints__Http__Url=http://0.0.0.0:8080
MemoryStore__Type=qdrant

docker/docker-compose.yaml Show resolved Hide resolved
@glahaye glahaye added this pull request to the merge queue Aug 25, 2023
Merged via the queue into microsoft:main with commit 7a93e53 Aug 25, 2023
5 checks passed
@crazyfox55
Copy link

I had a bit of trouble getting the webapp and webapi talking together so I'll put my .env files here for others to use.

\chat-copilot\webapi.env

AIService__Type=OpenAI
AIService__Models__Completion=gpt-3.5-turbo
AIService__Models__Planner=gpt-3.5-turbo
AIService__Key=YOUR_OPEN_AI_KEY
Kestrel__Endpoints__Http__Url=http://0.0.0.0:8080
MemoryStore__Type=qdrant

\chat-copilot\webapp.env

REACT_APP_BACKEND_URI=http://localhost:8080/

The localhost and 0.0.0.0 were throwing me off.

teamleader-dev pushed a commit to vlink-group/chat-copilot that referenced this pull request Oct 7, 2024
### Motivation and Context

Adding docker support to deploy into kubernetes or run in local docker
environment

### Description

Adding docker support to deploy into kubernetes or run in local docker
environment.
A new folder "docker" created under root, to build images, from root
directory, run
`docker build -f docker/webapi/Dockerfile -t repo/chat-copilot-webapi`
`docker build -f docker/webapi/Dockerfile -t repo/chat-copilot-webapp`
A docker-compose file is also created to start whole environment, under
docker directory, just run
`docker-compose up`, it uses .env file to read environment variables, so
make sure webapi and webapp directory has .env file

the manifests to deply chat-copilot into kubernetes environment can be
found here

https://github.com/huangyingting/flux2-gitops/tree/main/apps/base/chat-copilot

### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/copilot-chat/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/copilot-chat/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants