|
按照下面方法操作后,执行docker-compose up提示如下错误,是什么原因?
app: zhongkang host: af04da50-0d24-4fdc-b03b-5b791d9f697c cmd.run_all 执行失败 , target: host-eeed0eb935ed4377a355de6c3e742c44 ---- SaltResponse ---- success:true reason: OK data: {"return": [{"host-eeed0eb935ed4377a355de6c3e742c44": {"pid": 17325, "retcode": 1, "stderr": "The Compose file './docker-compose.yaml' is invalid because:\nInvalid top-level property \"netwORks\". Valid top-level sections for this Compose file are: services, version, networks, volumes, and extensions starting with \"x-\".\n\nYou might be seeing this error because you're using the wrong Compose file version. Either specify a supported version (e.g \"2.2\" or \"3.3\") and place your service definitions under the `services` key, or omit the `version` key and place your service definitions at the root of the file to use version 1.\nFor more on the Compose file format versions, see https://docs.docker.com/compose/compose-file/\nUnsupported config option for services.tomcat-zhongkang: 'loGGing'", "stdout": ""}}]} |
==========================
如果是多应用,目前默认的 5432是公共网关的数据库,自己业务上的数据库可以手工调整了进行远程访问,具体步骤如下:
xxx-vip 就是自己的应用目录,和url哪个前缀对应
# 进入目录
cd /store/xxx-vip
# 停止服务
docker-compose down
# 修改配置
vi docker-compose.yaml
#在文件里面 楼上说找密码的 POSTGRES_PASSWORD 这个是在 environment: 下面,在这个下面加上 ports:
#下面是docker-compose.yaml内容片段,不是指令,不要执行
environment:
POSTGRES_PASSWORD: XXX64330130a171
SMS_DB_PASSWORD: XXX64330130a171
UAA_DB_PASSWORD: XXX64330130a171
KONG_DB_PASSWORD: XXX64330130a171
X5_DB_PASSWORD: XXX64330130a171
ports:
- 5433:5432/tcp
# 片段完毕
# 保存后启动,这样5433就会连接 xxx-vip 的数据库了,注意楼上修改的文件是yaml,空格非常严格,绝对不能多一个少一个,ports前面是4个空格,下一行是6个,- 后面也是有一个,一定不要错
docker-compose up |
|
|