quickstarts/bindings/db
sunzhaochang 4f72d3ab44 Update README for bindings db
Signed-off-by: sunzhaochang <zhchsun1992@gmail.com>
2022-07-14 15:04:40 +08:00
..
Dockerfile Binding quickstart - Cron input PostgreSQL output (#669) 2022-06-22 18:06:18 -07:00
README.md Update README for bindings db 2022-07-14 15:04:40 +08:00
docker-compose.yml Binding quickstart - Cron input PostgreSQL output (#669) 2022-06-22 18:06:18 -07:00
orders.sql Binding quickstart - Cron input PostgreSQL output (#669) 2022-06-22 18:06:18 -07:00

README.md

Dapr Bindings - Sample Orders Database

This quickstart uses a specific sample database called postgres to back up orders data.

The database is implemented using the official base postgres container image as a base and customizing it to initialize using the SQL script in orders.sql. For convenience, building, running, and setting of customizable environment variables (e.g. DB name and password) is handled in the docker-compose.yml file.

To start the database simply run the following in this folder:

docker compose up

To explore the database using the interactive CLI run:

docker exec -i -t postgres psql --username postgres  -p 5432 -h localhost --no-password

At the prompt change to the orders database with:

\c orders;

Explore data using:

select * from orders;

To clean up, CTRL-C the terminal or run:

docker compose down