The Postgre listens on port 5432 by default. However, based on docker-compose.yaml, the port is forwarded to 5555 on your localhost. If you would like to connect to the DB, make sure the docker instance of Olmo API is running your local, then run below command:
docker compose exec db psql --user=postgres llmxIf you have psql command in your terminal, you can also run:
psql "postgres://app:llmz@localhost:5555/llmx?sslmode=disable"You will expect to open a psql terminal interface to query your local DB if successful. If you prefer accessing with pgAdmin, follow below steps:
- In the top toolbar, Click Object -> Register -> Server
- Under General tab, type
Olmo-apiin the "Name" field. Choose whatever "Server group" you'd like to put under. - Under Connection tab, type
localhostfor "Host name/address",5555for "Port". You can use default usernamepostgresto connect, or usernameappwith passwordllmz. - Click "Save" button, pgAdmin should be able to load data from your local DB!
The API uses a Google Cloud SQL database
for persistence. To connect to the production database install and configure the gcloud command and run:
gcloud beta sql connect llmx-api --project ai2-revizThe password for the postgres user can be found in 1Password.
If you can't connect to the database or don't have access to the 1Password vault, send a note to reops@allenai.org.
This repo is set up with Alembic to handle database migrations. See the migrations readme for info on them.