Skip to content

Commit fc04aa8

Browse files
authored
Sourabh/fix refresh db (run-llama#44)
* add Dockerfile for devcontainer * add nodejs installation * more deps needed for node.js installation * fix * fix * fix * fix * fix * update README + add Codespace origin if running in codespaces * use docker compose yaml * rename file * fix allow_origins set to include codespace origin * use features + remove workspace compose yaml * apt-get update * remove npm & poetry install * add nodejs feature * address variety of more issues with running on codespaces + issues with make migate * add one more step to backend readme * remove loose console log * fix refresh_db for linux * confirm with capital Y * readme updates
1 parent 950f88a commit fc04aa8

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

backend/Makefile

+3-7
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,9 @@ migrate:
1818

1919
refresh_db:
2020
# First ask for confirmation.
21-
read -p "Are you sure you want to refresh the local database? This will delete all data in your local db. [y/N] " -n 1 -r; \
22-
echo ""; \
23-
if [[ $$REPLY =~ ^[Yy]$$ ]]; then \
24-
make confirmed_refresh_db; \
25-
else \
26-
echo "Aborting."; \
27-
fi
21+
@echo -n "Are you sure you want to refresh the local database? This will delete all data in your local db. [Y/n] "; \
22+
read ans; \
23+
if [ $${ans:-'N'} = 'Y' ]; then make confirmed_refresh_db; else echo "Aborting."; fi
2824

2925
confirmed_refresh_db:
3026
echo "Refreshing database."

backend/README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ Live at https://secinsights.ai/
1010
1. Run `poetry install` to install dependencies for the project
1111
1. Create the `.env` file and source it. The `.env.development` file is a good template.
1212
1. `cp .env.development .env`
13-
1. Modify the `.env` by adding your own API keys
14-
- You can leave `AWS_KEY` & `AWS_SECRET` with dummy values
1513
1. `set -a`
1614
1. `source .env`
1715
1. Run the database migrations with `make migrate`
@@ -20,7 +18,7 @@ Live at https://secinsights.ai/
2018
- The server will not run in a container but will instead run directly on your OS.
2119
- This is to allow for use of debugging tools like `pdb`
2220
1. Lastly, you will likely want to populate your local database with some sample SEC filings
23-
- We have a script for this! But first, open your `.env` file and replace the placeholder values for the `OPENAI_API_KEY` with your own OpenAI API key
21+
- We have a script for this! But first, open your `.env` file and replace the placeholder value for the `OPENAI_API_KEY` with your own OpenAI API key
2422
- At some point you will want to do the same for the other secret keys in here like `POLYGON_IO_API_KEY`, `AWS_KEY`, & `AWS_SECRET`
2523
- Source the file again with `set -a` then `source .env`
2624
- Run `make seed_db_local`

0 commit comments

Comments
 (0)