Fetch the repository succeeded.
This action will force synchronization from zhengqingya/docker-compose, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
version: '3'
services:
postgresql:
image: registry.cn-hangzhou.aliyuncs.com/zhengqing/postgres:14.5 # 镜像'postgres:14.5'
container_name: postgresql # 容器名为'postgresql'
restart: unless-stopped # 指定容器退出后的重启策略为始终重启,但是不考虑在Docker守护进程启动时就已经停止了的容器
# 设置环境变量,相当于docker run命令中的-e
environment:
TZ: Asia/Shanghai
LANG: en_US.UTF-8
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 123456
ALLOW_IP_RANGE: 0.0.0.0/0 # 允许所有ip访问
# 数据卷挂载路径设置,将本机目录映射到容器目录
volumes:
- "./postgresql/data:/var/lib/postgresql/data"
# 映射端口
ports:
- "5432:5432"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。