gpt4 book ai didi

Docker 组成 : expected a mapping or list of mappings for merging, 但发现标量

转载 作者:行者123 更新时间:2023-12-02 19:20:10 32 4
gpt4 key购买 nike

我正在尝试使用以下指南在 Windows 环境下在 Docker 上设置 Redash:

https://medium.com/@ikishan/creating-a-new-age-dashboard-with-self-hosted-open-source-redash-41e91434390

但是当我到达以下步骤时:

docker-compose run --rm server create_db

我收到这个错误:

ERROR: yaml.constructor.ConstructorError: while constructing a mapping in ".\docker-compose.yml", line 1, column 1

expected a mapping or list of mappings for merging, but found scalar in ".\docker-compose.yml", line 2, column 19

前两行在docker-compose.yml中配置如下:

1: version: ‘2’

2: x-redash-service: &redash-service

第 2 行第 19 列是“&”。

此错误的来源可能是什么?

最佳答案

原来标识完全被破坏了:

version: '2'
x-redash-service: &redash-service
image: redash:latest
depends_on:
- postgres
- redis
env_file: redash.env
restart: always
services:
server:
<<: *redash-service
command: server
ports:
- "5000:5000"
environment:
REDASH_WEB_WORKERS: 4
scheduler:
<<: *redash-service
command: scheduler
environment:
QUEUES: "celery"
WORKERS_COUNT: 1
scheduled_worker:
<<: *redash-service
command: worker
environment:
QUEUES: "scheduled_queries,schemas"
WORKERS_COUNT: 1
adhoc_worker:
<<: *redash-service
command: worker
environment:
QUEUES: "queries"
WORKERS_COUNT: 2
redis:
image: redis:latest
restart: always
postgres:
image: postgres:latest
env_file: redash.env
restart: always
nginx:
image: redash/nginx:latest
ports:
- "80:80"
depends_on:
- server
links:
- server:redash
restart: always

关于Docker 组成 : expected a mapping or list of mappings for merging, 但发现标量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60564386/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com