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

Refactor docker support and add web-searcher image #501

Merged
merged 6 commits into from
Oct 20, 2023

Conversation

huangyingting
Copy link
Contributor

Motivation and Context

  1. Why is this change required? Refactor docker support to reflect recent configuration changes and add web-searcher docker image support.
  2. What problem does it solve? Refactor docker support to reflect recent configuration changes and add web-searcher docker image support.
  3. What scenario does it contribute to? Local docker developerment with docker-compose support
  4. If it fixes an open issue, please link to the issue here. N/A

Description

  1. Reflect recent configuration changes to use .env files for configuration rather than baking in values. Add an .env.example file to the docker directory to serve as a template. Keep the refactored docker config isolated in the docker directory to avoid impacting the original configuration.
  2. Add docker configuration and image build support for the new web-searcher plugin.
  3. Update the copilot-build-image workflow to also build the web-searcher docker image.

Contribution Checklist

@github-actions github-actions bot added the github actions Pull requests that update GitHub Actions code label Oct 14, 2023
@huangyingting huangyingting changed the title Refactor docker support and add web-search image Refactor docker support and add web-searcher image Oct 14, 2023
@Ryangr0
Copy link

Ryangr0 commented Oct 14, 2023

Really nice, this is almost 1:1 what I have for my application that builds on top of chat copilot. Env vars are the way to go. I have a question about the search. I've played around with this kind of idea in the past, and something I got to work with Langchain was searxng. Searxng is good, because it's open sourcem, free, keeps "you" anonymous and it's able to aggregate search results across different search engines. And it layers between your service and for example google, meaning that you don't need to pay for API access to their search.

This is what I had the service look like in my docker-compose.yml

searxng:
    container_name: searxng
    image: searxng/searxng:latest
    ports:
     - "8080:8080"
    volumes:
      - ./searxng:/etc/searxng:rw
    environment:
      - SEARXNG_BASE_URL=http://localhost:8080/
    cap_drop:
      - ALL
    cap_add:
      - CHOWN
      - SETGID
      - SETUID
    logging:
      driver: "json-file"
      options:
        max-size: "1m"
        max-file: "1"

Copy link
Collaborator

@glahaye glahaye left a comment

Choose a reason for hiding this comment

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

This PR leaves the previous Docker-related files in place, creating duplicates.

Please either modify the files that already exist, or delete them.

docker/docker/webapp/Dockerfile.nginx Outdated Show resolved Hide resolved
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.

Done review and removed old files.

@glahaye glahaye added this pull request to the merge queue Oct 20, 2023
Merged via the queue into microsoft:main with commit d76692a Oct 20, 2023
5 checks passed
@huangyingting huangyingting deleted the remote branch October 20, 2023 22:18
Ryangr0 pushed a commit to webgrip/chat-copilot that referenced this pull request Oct 26, 2023
### Motivation and Context

1. Why is this change required? Refactor docker support to reflect
recent configuration changes and add web-searcher docker image support.
3. What problem does it solve? Refactor docker support to reflect recent
configuration changes and add web-searcher docker image support.
4. What scenario does it contribute to? Local docker developerment with
docker-compose support
  5. If it fixes an open issue, please link to the issue here. N/A


### Description
1. Reflect recent configuration changes to use .env files for
configuration rather than baking in values. Add an .env.example file to
the docker directory to serve as a template. Keep the refactored docker
config isolated in the docker directory to avoid impacting the original
configuration.
2. Add docker configuration and image build support for the new
web-searcher plugin.
3. Update the copilot-build-image workflow to also build the
web-searcher docker image.


### Contribution Checklist


- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/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 😄
teamleader-dev pushed a commit to vlink-group/chat-copilot that referenced this pull request Oct 7, 2024
### Motivation and Context

1. Why is this change required? Refactor docker support to reflect
recent configuration changes and add web-searcher docker image support.
3. What problem does it solve? Refactor docker support to reflect recent
configuration changes and add web-searcher docker image support.
4. What scenario does it contribute to? Local docker developerment with
docker-compose support
  5. If it fixes an open issue, please link to the issue here. N/A


### Description
1. Reflect recent configuration changes to use .env files for
configuration rather than baking in values. Add an .env.example file to
the docker directory to serve as a template. Keep the refactored docker
config isolated in the docker directory to avoid impacting the original
configuration.
2. Add docker configuration and image build support for the new
web-searcher plugin.
3. Update the copilot-build-image workflow to also build the
web-searcher docker image.


### Contribution Checklist


- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [Contribution
Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/chat-copilot/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