Skip to content

Commit

Permalink
DAN-165 Option to pull image from hub (onyx-dot-app#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhongsun96 authored Jul 8, 2023
1 parent 3b64d62 commit 367330d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ COPY ./alembic /app/alembic
COPY ./alembic.ini /app/alembic.ini

ENV PYTHONPATH /app
CMD ["/bin/sh", "-c", "alembic upgrade head && uvicorn danswer.main:app --host 0.0.0.0 --port 8080"]
CMD ["/bin/sh", "-c", "alembic upgrade head && echo \"Starting Danswer Api Server\" && uvicorn danswer.main:app --host 0.0.0.0 --port 8080"]
9 changes: 4 additions & 5 deletions deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,11 @@ Docker Compose provides the easiest way to get Danswer up and running.
Requirements: Docker and docker compose

1. To run Danswer, navigate to `docker_compose` directory and run the following:
- `docker compose -f docker-compose.dev.yml -p danswer-stack up -d --build`
- `docker compose -f docker-compose.dev.yml -p danswer-stack up -d --pull always --force-recreate`
- or run: `docker compose -f docker-compose.dev.yml -p danswer-stack up -d --build --force-recreate`
to build from source
- This will start Web/API servers, Postgres (backend DB), Qdrant (vector DB), and the background indexing job.
- Downloading packages/requirements may take 20+ minutes depending on your internet connection and whether it needs
to install packages for GPU.
- If you want to adjust any environment variables, either use the `-e` flag or the `--env-file` flag when running the `docker compose` command,

- Downloading images or packages/requirements may take 15+ minutes depending on your internet connection.


2. To shut down the deployment, run:
Expand Down
3 changes: 3 additions & 0 deletions deployment/docker_compose/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: '3'
services:
api_server:
image: danswer/danswer-api-server:latest
build:
context: ../../backend
dockerfile: Dockerfile
Expand All @@ -21,6 +22,7 @@ services:
- local_dynamic_storage:/home/storage
- file_connector_tmp_storage:/home/file_connector_storage
background:
image: danswer/danswer-background:latest
build:
context: ../../backend
dockerfile: Dockerfile.background
Expand All @@ -39,6 +41,7 @@ services:
- local_dynamic_storage:/home/storage
- file_connector_tmp_storage:/home/file_connector_storage
web_server:
image: danswer/danswer-web-server:latest
build:
context: ../../web
dockerfile: Dockerfile
Expand Down
3 changes: 3 additions & 0 deletions deployment/docker_compose/docker-compose.prod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: '3'
services:
api_server:
image: danswer/danswer-api-server:latest
build:
context: ../../backend
dockerfile: Dockerfile
Expand All @@ -19,6 +20,7 @@ services:
- local_dynamic_storage:/home/storage
- file_connector_tmp_storage:/home/file_connector_storage
background:
image: danswer/danswer-background:latest
build:
context: ../../backend
dockerfile: Dockerfile.background
Expand All @@ -36,6 +38,7 @@ services:
- local_dynamic_storage:/home/storage
- file_connector_tmp_storage:/home/file_connector_storage
web_server:
image: danswer/danswer-web-server:latest
build:
context: ../../web
dockerfile: Dockerfile
Expand Down

0 comments on commit 367330d

Please sign in to comment.