文档说明:只记录关键地方;
试验环境: linux debian 11
postgresql container
version: "3"
services:
postgresql-server:
image: postgres:15-alpine
container_name: postgres
hostname: "postgresql"
restart: always
ports:
- "5432:5432"
environment:
- "POSTGRES_PASSWORD=mysecretpassword"
volumes:
- "./postgresql-15-data:/var/lib/postgresql/data"
pgadmin4:
image: dpage/pgadmin4
restart: always
container_name: pgadmin4
links:
- postgresql-server
ports:
- "80:80"
environment:
- "[email protected]"
- "PGADMIN_DEFAULT_PASSWORD=SuperSecret"
- "PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION=True"
- "PGADMIN_CONFIG_LOGIN_BANNER='Authorised users only!'"
- "PGADMIN_CONFIG_CONSOLE_LOG_LEVEL=10"