Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robbinparrish/postgresql-with-extentions-deployment
Docker image for postgresql with additional extentions.
https://github.com/robbinparrish/postgresql-with-extentions-deployment
database docker docker-compose dockerfile docs learning learning-project linux notes postgresql postgresql-database postgresql-extentions
Last synced: about 1 month ago
JSON representation
Docker image for postgresql with additional extentions.
- Host: GitHub
- URL: https://github.com/robbinparrish/postgresql-with-extentions-deployment
- Owner: robbinparrish
- Created: 2023-10-31T08:36:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-01T06:13:11.000Z (about 1 year ago)
- Last Synced: 2024-02-16T08:39:15.440Z (10 months ago)
- Topics: database, docker, docker-compose, dockerfile, docs, learning, learning-project, linux, notes, postgresql, postgresql-database, postgresql-extentions
- Language: Dockerfile
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Docker image for postgresql with additional extentions.
### Building the docker image.
```
docker build -t postgresql:with-extentions-15-4 .
```### Running the docker image.
```
docker run -itd --restart always --name postgresql-with-extentions-15-4 \
-e POSTGRES_PASSWORD=YOUR_DB_PASSWORD \
-v ./pgsql-db/data:/var/lib/postgresql/data \
-v ./pgsql-db/log:/var/log/postgresql \
postgresql:with-extentions-15-4
```### Check that all the extentions are loaded.
- Get the container ip address.
```
docker inspect postgresql-with-extentions-15-4
```- Run psql query.
```
docker run -it --rm postgresql:with-extentions-15-4 psql -h IPADDR_OF_CONTAINER -U postgres -c 'select * from pg_extension;'
```### With docker-compose.
- Starting the container.
```
docker-compose up -d
```- Checking the container logs.
```
docker-compose logs -f
```