This project
docker-compose up
docker-compose down
pgAdmin
The products.csv file must be included in a folder called Data that is include in the .gitignore
file
python import_products.py
Name: db
Host name: db
Port: 5432
Maintenance database: postgres
Username: postgres
Password: POSTGRES_PASSWORD (from .env)
Save password?: yes
[SAVE]
Create a dedicated user for each database.
Right click on db
-> Create
-> Login/Group Role...
Name: [name for the user]
Password: [password for the user]
Can login?: yes
[SAVE]
Right click on Databases
-> Create
-> Database...
Name: [name for the database] (same as the user)
db
-> Databases
-> (name of just created db)
-> Schemas
-> public
Right click on the public
schema and select Properties...
- Click on
+
button in the "Privileges" section. - Under "Grantee" select the name of the created "user"
- In the "Privileges" column select
all
[SAVE]