mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-09-11 14:36:35 +03:00
commit
da9c080dae
39
.github/workflows/docker-build-test.yml
vendored
39
.github/workflows/docker-build-test.yml
vendored
@ -1,39 +0,0 @@
|
||||
name: Deploy Backend to Preview ECS
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- 'backend/core/**'
|
||||
|
||||
env:
|
||||
ECR_REPOSITORY: quivr # set this to your Amazon ECR repository name
|
||||
ECS_SERVICE: quivr-preview # set this to your Amazon ECS service name
|
||||
ECS_CLUSTER: quivr # set this to your Amazon ECS cluster name # file, e.g. .aws/task-definition.json
|
||||
CONTAINER_NAME: quivr # set this to the name of the container in the
|
||||
# containerDefinitions section of your task definition
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
name: Deploy
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./backend/
|
||||
environment: production
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Build
|
||||
id: build-image
|
||||
run: |
|
||||
# Build a docker container and
|
||||
# push it to ECR so that it can
|
||||
# be deployed to ECS.
|
||||
docker build -t quivr-test-docker .
|
||||
|
@ -9,10 +9,10 @@ COPY ./requirements.txt /code/requirements.txt
|
||||
|
||||
RUN pip install --no-cache-dir -r /code/requirements.txt --timeout 100
|
||||
|
||||
#You may need to run `chmod +x ./backend/scripts/start.sh` on your host machine if you get a permission error
|
||||
#You may need to run `chmod +x ./backend/core/scripts/start.sh` on your host machine if you get a permission error
|
||||
COPY ./scripts/start.sh /code/scripts/start.sh
|
||||
RUN chmod +x /code/scripts/start.sh
|
||||
|
||||
COPY ./core /code/
|
||||
COPY . /code
|
||||
|
||||
ENTRYPOINT ["bash", "/code/scripts/start.sh"]
|
||||
|
@ -8,13 +8,13 @@ RUN apt-get update && apt-get install -y liblzma-dev cmake git
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the requirements file
|
||||
COPY ./private/requirements.txt /app/requirements.txt
|
||||
COPY ./requirements.txt /app/requirements.txt
|
||||
|
||||
# Install Python dependencies
|
||||
RUN pip install --no-cache-dir -r /app/requirements.txt --timeout 100
|
||||
|
||||
# Copy your application's code to the Docker container
|
||||
COPY ./private /app
|
||||
COPY . /app
|
||||
|
||||
# Start the Uvicorn server on port 5051
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5051"]
|
||||
|
@ -19,8 +19,8 @@ services:
|
||||
env_file:
|
||||
- ./backend/core/.env
|
||||
build:
|
||||
context: backend
|
||||
dockerfile: core/Dockerfile
|
||||
context: backend/core
|
||||
dockerfile: Dockerfile
|
||||
container_name: backend-core
|
||||
restart: always
|
||||
volumes:
|
||||
|
@ -19,8 +19,8 @@ services:
|
||||
env_file:
|
||||
- ./backend/core/.env
|
||||
build:
|
||||
context: backend
|
||||
dockerfile: core/Dockerfile
|
||||
context: backend/core
|
||||
dockerfile: Dockerfile
|
||||
container_name: backend-core
|
||||
restart: always
|
||||
volumes:
|
||||
@ -32,8 +32,8 @@ services:
|
||||
env_file:
|
||||
- ./backend/private/.env
|
||||
build:
|
||||
context: backend
|
||||
dockerfile: private/Dockerfile
|
||||
context: backend/private
|
||||
dockerfile: Dockerfile
|
||||
container_name: backend-private
|
||||
restart: always
|
||||
volumes:
|
||||
|
@ -15,7 +15,7 @@ services:
|
||||
env_file:
|
||||
- ./backend/core/.env
|
||||
build:
|
||||
context: backend/core/
|
||||
context: backend/core
|
||||
dockerfile: Dockerfile
|
||||
container_name: backend-core
|
||||
restart: always
|
||||
|
Loading…
Reference in New Issue
Block a user