Giter VIP home page Giter VIP logo

ezytutors's Introduction

Create docker container

docker run --name dev-postgres --rm -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=Pa55w0rd -e PGDATA=/var/lib/postgresql/data/pgdata -v /tmp:/var/lib/postgresql/data -P -p 127.0.0.1:5432:5432 -it postgres:alpine

docker run --name dev-postgres --rm -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=Pa55w0rd -e PGDATA=/var/lib/postgresql/data/pgdata -v /tmp:/var/lib/postgresql/data -p 5432:5432 -it postgres:14.1-alpine

Connect to docker container in interactive mode

docker exec -it dev-postgres psql -U doAdmin

Grant all privileges on database to user

GRANT ALL PRIVILEGES ON DATABASE <<DATABASE_NAME>> TO <>

Grant CRUD privileges to database user

GRANT SELECT, INSERT, UPDATE, DELETE ON ALL TABLES IN SCHEMA <<SCHEMA_NAME>> TO <>;

Grant Execute privileges to database user

GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA <<SCHEMA_NAME>> TO <>;

Run ite1 in the project root

cd tutor-db

cargo run --bin iter1

Run the program from the workspace root instead of the project root

cargo run --bin iter1 -p tutor-db

If you choose to do this make sure the .env file containing the database access credentials is located within the workspace root as opposed to the project root.

ezytutors's People

Contributors

cmonney avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.