Docker运行PostgreSQL
docker-compose.yml
version: '3.1'
services:
db:
image: postgres
restart: always
ports:
- 5432:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 123456
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- /usr/local/docker/postgre/data:/var/lib/postgresql/data/pgdata
相关文章