...
Alternative - Docker Compose for Postgres & pgAdmin
After installation you can access pgAdmin via port 6060
to manage the database.
In a web browser navigate to: http://my-server:6060
Code Block | ||
---|---|---|
| ||
version: '3.5'
services:
postgres:
container_name: postgres_container
image: postgres
environment:
POSTGRES_USER: {CHANGE HERE}
POSTGRES_PASSWORD: {CHANGE HERE}
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
ports:
- "5432:5432"
networks:
- postgres
restart: unless-stopped
pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: {CHANGE HERE}
PGADMIN_DEFAULT_PASSWORD: {CHANGE HERE}
PGADMIN_CONFIG_SERVER_MODE: 'False'
volumes:
- pgadmin:/root/.pgadmin
ports:
- "6060:80"
networks:
- postgres
restart: unless-stopped
networks:
postgres:
driver: bridge
volumes:
postgres:
pgadmin:
|
Configure Postgres Server
...