我正在使用 docker-compose 作为哨兵本地安装的一部分。
下面是我的 docker-compose.yml 的 nginx 部分的片段。这是提供给我的 nginx 容器配置。您会注意到它有一个现有的卷安装。
nginx:
<< : *restart_policy
ports:
- '$SENTRY_BIND:80/tcp'
image: 'nginx'
volumes:
- type: bind
read_only: true
source: ./nginx
target: /etc/nginx
depends_on:
- web
- relay
Run Code Online (Sandbox Code Playgroud)
问题是我需要额外的安装才能使我的 nginx 配置正常工作。我需要能够安装 SSL 证书。当我对 nginx 部分进行以下修改时......
nginx:
<< : *restart_policy
ports:
- '$SENTRY_BIND:80/tcp'
image: 'nginx'
volumes:
- type: bind
read_only: true
source: ./nginx
target: /etc/nginx
- type: bind
read_only: true
source: ./certs
target: /etc/nginx/certs
depends_on:
- web
- relay
relay:
Run Code Online (Sandbox Code Playgroud)
...使用 docker-compose up -d 时出现以下错误: …