File tree Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -36,15 +36,29 @@ Tools used for development:
36
36
37
37
### Running Balancer for development
38
38
39
- Running Balancer:
40
- - Start Docker Desktop and run ` docker compose up --build `
41
- - The email and password are set in ` server/api/management/commands/createsu.py `
42
- - Download a sample of papers to upload from [ https://balancertestsite.com ] ( https://balancertestsite.com/ )
39
+ Start the Postgres, Django REST, and React services by starting Docker Desktop and running ` docker compose up --build `
43
40
44
- Running pgAdmin:
41
+ #### Postgres
42
+ - Download a sample of papers to upload from [ https://balancertestsite.com ] ( https://balancertestsite.com/ )
45
43
- The email and password of ` pgAdmin ` are specified in ` balancer-main/docker-compose.yml `
46
- - The first time you use ` pgAdmin ` after building the Docker containers you will need to register the server.
47
- The ` Host name/address ` , ` Username ` and ` Password ` are specified in ` balancer-main/docker-compose.yml `
44
+ - The first time you use ` pgAdmin ` after building the Docker containers you will need to register the server.
45
+ - The ` Host name/address ` is the Postgres server service name in the Docker Compose file
46
+ - The ` Username ` and ` Password ` are the Postgres server environment variables in the Docker Compose file
47
+ - You can use the below code snippet to query the database from a Jupyter notebook:
48
+
49
+ ```
50
+ from sqlalchemy import create_engine
51
+ import pandas as pd
52
+
53
+ engine = create_engine("postgresql+psycopg2://balancer:balancer@localhost:5433/balancer_dev")
54
+
55
+ query = "SELECT * FROM api_embeddings;"
56
+
57
+ df = pd.read_sql(query, engine)
58
+ ```
59
+
60
+ #### Django REST
61
+ - The email and password are set in ` server/api/management/commands/createsu.py `
48
62
49
63
## Local Kubernetes Deployment
50
64
You can’t perform that action at this time.
0 commit comments