Skip to content

Commit

Permalink
Add pgadmin container in docker-compose.
Browse files Browse the repository at this point in the history
  • Loading branch information
sudiptob2 committed Jun 11, 2024
1 parent 33209c5 commit c38fd7d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
20 changes: 18 additions & 2 deletions developer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ services:
container_name: postgres
image: postgres:15.2
hostname: postgres
# Either "host" or "bridge"
network_mode: "bridge"
# Either "linux/amd64" or "linux/arm64/v8" (e.g. Mac M1 systems)
platform: linux/arm64/v8
environment:
Expand All @@ -19,4 +17,22 @@ services:
retries: 3
start_period: 3s
timeout: 10s
networks:
- pgnetwork

pgadmin:
image: dpage/pgadmin4
environment:
- [email protected]
- PGADMIN_DEFAULT_PASSWORD=admin
ports:
- "5433:80"
depends_on:
- postgres
volumes:
- ./servers.json:/pgadmin4/servers.json
networks:
- pgnetwork

networks:
pgnetwork:
15 changes: 15 additions & 0 deletions developer/servers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"Servers": {
"1": {
"Name": "YHS_Local",
"Group": "Servers",
"Host": "postgres",
"Port": 5432,
"MaintenanceDB": "yhs",
"Username": "yhs",
"Password": "yhs",
"SSLMode": "prefer",
"PassFile": "/pgadmin4/servers.json"
}
}
}

0 comments on commit c38fd7d

Please sign in to comment.