diff --git a/README.md b/README.md index 7d3a872..27d10e8 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -187,4 +205,4 @@ Testing and formatting is done using a Makefile inside `[root]/backend` ```sh make format -``` +``` \ No newline at end of file