docker-compose安装postsql(PostgreSQL)数据库

 

docker-compose.yml

复制代码
version: '3'
services:
 db:  
  container_name: pgsql
  restart: always
  image: postgres:latest
  privileged: true
  ports:
    - 5432:5432
  environment:
    POSTGRES_PASSWORD: root #密码
    PGDATA: /var/lib/postgresql/data/pgdata
  volumes:
    - /data/pgdata:/var/lib/postgresql/data/pgdata
复制代码

 

posted @   yvioo  阅读(751)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2021-01-29 windows安装openoffice4
2021-01-29 SpringBoot整合openoffice实现word文档的读取和导入及报错处理
2021-01-29 SpringBoot启动报错:ould not be registered. A bean with that name has already been defined in file and overriding is disabled.
点击右上角即可分享
微信分享提示