搬运工-compose.yml
D1, D2, D3 = zip(*document_matrix_projections)
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.quiver(D1)
plt.show()
当我运行version: '2.0'
services:
asdf-db:
container_name: asdf-db
build: ./asdf/db
ports:
- 5435:5432 # expose ports - HOST:CONTAINER
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
healthcheck:
test: exit 0
asdf-service:
container_name: asdf-service
build: ./
volumes:
- '.:/usr/src/asdf'
ports:
- 5001:5000 # expose ports - HOST:CONTAINER
environment:
- APP_SETTINGS=asdf.config.DevelopmentConfig
- DATABASE_URL=postgres://postgres:postgres@asdf-db:5432/asdf_dev
- DATABASE_TEST_URL=postgres://postgres:postgres@asdf-db:5432/asdf_test
depends_on:
asdf-db:
condition: service_healthy
links:
- asdf-db
时,我收到以下错误消息:
docker-compose up -d
我已尝试将版本切换为2.1,然后我收到以下错误消息:
ERROR: The Compose file '.\docker-compose.yml' is invalid because:
Unsupported config option for services.asdf-db: 'healthcheck'
services.asdf-service.depends_on contains an invalid type, it should be an array
如何将asdf-db更改为对象?
答案 0 :(得分:2)
在2.1
中添加了健康检查,因此您至少需要该版本。
在2.1版本中,您在links
内有depends_on
,但它应该在同一级别。