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

README: Update to use docker-compose #12

Merged
merged 1 commit into from
Mar 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 34 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,23 +118,48 @@ Response:

## ✅ Running locally

The `backend` code is located in `/backend`.
The easiest way to get started is to use `docker-compose` to run the server.

The backend code relies on having access to a postgres instance.
**Configure the environment**

Add `.local.env` file to the root directory with the following content:

### Launch Postgres
```sh
OPENAI_API_KEY=... # Your OpenAI API key
```

Build the images:
```sh
docker compose build
```

Use the `docker-compose.yml` file in the root directory to launch a postgres instance.
Run the services:

```sh
docker compose up postgres
docker compose up
```

### Launch the extraction webserver
This will launch both the extraction server and the postgres instance.

At the moment, we don't have the backend defined in docker compose, so
you'll need to set up the backend.
Verify that the server is running:

```sh
curl -X 'GET' 'http://localhost:8000/ready'
```

This should return `ok`.


## Contributions

Feel free to develop in this project for your own needs!
For now, we are not accepting pull requests, but would love to hear [questions, ideas or issues](https://github.com/langchain-ai/langchain-extract/discussions).

## Development

To set up for development, you will need to install [Poetry](https://python-poetry.org/).

The backend code is located in the `backend` directory.

```sh
cd backend
Expand All @@ -158,13 +183,6 @@ From `/backend`:
OPENAI_API_KEY=[YOUR API KEY] python -m server.main
```

## Set up for development

Use this if you want to develop in your own fork of the repo.

For now, we will not be accepting pull requests, but would love to hear any feedback
about ideas or issues etc.

### Testing

Create a test database. The test database is used for running tests and is
Expand All @@ -187,4 +205,4 @@ Testing and formatting is done using a Makefile inside `[root]/backend`

```sh
make format
```
```
Loading