Add basic PostgreSQL deployment with pgAdmin
This commit is contained in:
parent
5e8ffd3a4c
commit
28a884d08a
40
postgresql/docker-compose.yml
Normal file
40
postgresql/docker-compose.yml
Normal file
@ -0,0 +1,40 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16
|
||||
container_name: postgres_db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: your_secure_password_here
|
||||
POSTGRES_DB: myapp
|
||||
PGDATA: /var/lib/postgresql/data/pgdata
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5432:5432"
|
||||
networks:
|
||||
- postgres_network
|
||||
|
||||
pgadmin:
|
||||
image: dpage/pgadmin4:latest
|
||||
container_name: pgadmin
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
PGADMIN_DEFAULT_EMAIL: admin@example.com
|
||||
PGADMIN_DEFAULT_PASSWORD: admin_password_here
|
||||
volumes:
|
||||
- pgadmin_data:/var/lib/pgadmin
|
||||
ports:
|
||||
- "8080:80"
|
||||
networks:
|
||||
- postgres_network
|
||||
depends_on:
|
||||
- postgres
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
pgadmin_data:
|
||||
|
||||
networks:
|
||||
postgres_network:
|
||||
driver: bridge
|
Loading…
Reference in New Issue
Block a user