Skip to content

Commit

Permalink
ci file
Browse files Browse the repository at this point in the history
  • Loading branch information
aarushik93 committed Apr 19, 2024
1 parent de405bd commit 1fec1c0
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- name: Build & Start Services
run: |
docker-compose -f docker-compose.full.yml up -d --build
docker-compose -f docker-compose.ci.yml up -d --build
- name: Wait for DB to be ready
uses: MaximeGoyette/wait-for-it-action@master
Expand Down
50 changes: 50 additions & 0 deletions docker-compose.ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
version: "3"
services:
postgres:
image: ankane/pgvector:latest
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_DB: ${DB_NAME}
PGUSER: ${DB_USER}
healthcheck:
test: pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB
interval: 10s
timeout: 5s
retries: 5
ports:
- "${DB_PORT}:5432"
networks:
- codex_network
app:
build:
context: .
dockerfile: Dockerfile
environment:
# Override DATABASE_URL from .env with host and port (db:5432) of DB service
DATABASE_URL: "postgresql://${DB_USER}:${DB_PASS}@postgres:${DB_PORT}/${DB_NAME}"
OPENAI_API_KEY: ${OPENAI_API_KEY}
RUN_ENV: ${RUN_ENV}
ports:
- "${PORT:-8080}:8000"
depends_on:
postgres:
condition: service_healthy
networks:
- codex_network
healthcheck:
test:
[
"CMD",
"curl",
"-f",
"http://localhost:${PORT:-8000}/docs"
]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s

networks:
codex_network:
driver: bridge

0 comments on commit 1fec1c0

Please sign in to comment.