docker compose示例
·
# 这是 Docker Compose 项目名称
name: f-xa-01-api
# 服务列表
services:
# 服务名
postgres:
container_name: my-postgres
image: postgres
environment:
# 设置postgres默认管理员账号和密码
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
# 设置时区为上海(中国标准时间)
TZ: Asia/Shanghai
ports:
- "${POSTGRES_PORT}:5432"
networks:
f-xa-01-api:
env_file:
- .env
# 设置重启策略为总是重启,(restart默认为no(从不自动重启))
restart: always
# 网络列表
networks:
f-xa-01-api:
更多推荐


所有评论(0)