Docker运行PostgreSQL

2020-06-17 00:00:00 函数 专区 订阅 付费 映射

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

相关文章