Skip to content

Commit

Permalink
Merged background and api-server images
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddanbrown committed Jul 13, 2023
1 parent c6bcd5e commit f27364a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 40 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/docker-build-and-push-on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,3 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true
tags: danswer/danswer-api-server:${{ github.ref_name }}

- name: Background Job Docker Build and Push
uses: docker/build-push-action@v2
with:
context: ./backend
file: ./backend/Dockerfile.background
platforms: linux/amd64,linux/arm64
push: true
tags: danswer/danswer-background:${{ github.ref_name }}
8 changes: 0 additions & 8 deletions .github/workflows/docker-tag-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,3 @@ jobs:
docker push danswer/danswer-api-server:latest
docker manifest create danswer/danswer-api-server:latest danswer/danswer-api-server:latest
docker manifest push danswer/danswer-api-server:latest
- name: Pull, Tag and Push Background Job Image
run: |
docker pull danswer/danswer-background:${{ github.event.inputs.version }}
docker tag danswer/danswer-background:${{ github.event.inputs.version }} danswer/danswer-background:latest
docker push danswer/danswer-background:latest
docker manifest create danswer/danswer-background:latest danswer/danswer-background:latest
docker manifest push danswer/danswer-background:latest
8 changes: 6 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
FROM python:3.11-slim-bullseye

RUN apt-get update \
&& apt-get install -y git cmake pkg-config libprotobuf-c-dev protobuf-compiler \
libprotobuf-dev libgoogle-perftools-dev libpq-dev build-essential curl \
&& apt-get install -y git cmake pkg-config libprotobuf-c-dev protobuf-compiler \
libprotobuf-dev libgoogle-perftools-dev libpq-dev build-essential cron curl \
supervisor \
&& rm -rf /var/lib/apt/lists/*

COPY ./requirements/default.txt /tmp/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /tmp/requirements.txt
RUN playwright install
RUN playwright install-deps

WORKDIR /app
COPY ./danswer /app/danswer
COPY ./alembic /app/alembic
COPY ./alembic.ini /app/alembic.ini
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf

ENV PYTHONPATH /app
CMD ["/bin/sh", "-c", "alembic upgrade head && echo \"Starting Danswer Api Server\" && uvicorn danswer.main:app --host 0.0.0.0 --port 8080"]
19 changes: 0 additions & 19 deletions backend/Dockerfile.background

This file was deleted.

5 changes: 3 additions & 2 deletions deployment/docker_compose/docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ services:
- local_dynamic_storage:/home/storage
- file_connector_tmp_storage:/home/file_connector_storage
background:
image: danswer/danswer-background:latest
image: danswer/danswer-api-server:latest
build:
context: ../../backend
dockerfile: Dockerfile.background
dockerfile: Dockerfile
command: /usr/bin/supervisord
depends_on:
- relational_db
- vector_db
Expand Down

0 comments on commit f27364a

Please sign in to comment.