PostgreSQL
PostgreSQL + Cloudbeaver
Description: Run Docker container with a postgre database inside. Database sample from www.postgresql.org. Database files will be stored in your local folder.
-
Clone repository
-
Launch commands in terminal
# move to the work dir
cd {path/folder_name}
# buuild the image
docker build . -f Dockerfile.txt -t my-test-postgres-db
# run the container
docker run --name my-postgres-container \
-p 5432:5432 \
-d -v "$(pwd)":/var/lib/postgresql/data -v "$(pwd)":/docker-entrypoint-initdb.d my-test-postgres-db
- Connect to database using your database client
- Host: localhost
- Port: 5432
- User: postgres
- Password: postgres
- Stop the container in terminal when you finish
docker stop my-postgres-container
Useful linkes:
Description: Run Docker container with empty postgre database and cloudbeaver app using Docker-compose.
-
Clone repository
-
Launch commands in terminal
cd {path/folder_name}
docker-compose up -d
- Connect to database using cloudbeaver client
- set up admin credentials
- Host: postgres
- Port: 5432
- User: postgres
- Password: postgres
if there is no option to edit DB run the following query:
set default_transaction_read_only = off;
- Stop the container in terminal when you finish
docker-compose down