错误:yaml.scanner.ScannerError:“ ./ docker-compose.yml”第24行第16列

时间:2019-09-25 18:28:52

标签: docker ssl nginx docker-compose dockerfile

https://medium.com/@francoisromain/host-multiple-websites-with-https-inside-docker-containers-on-a-single-server-18467484ab95

使用上面链接中的命令创建我的环境。

我用jwilder / nginx-proxy创建了代理。但是在尝试运行Web应用程序以连接到代理时遇到错误。

version: "3"
services:
  app:
    image: node:alpine
    volumes:
      - ./:/app
    working_dir: /app
    depends_on:
      - mongo
    environment:
      NODE_ENV: development
    ports:
      - 3000:3000
    command: npm run dev
  mongo:
    image: mongo
    expose:
      - 27017
    volumes:
      - ./data/db:/data/db
services:
  my-app:
    …
    environment:
      VIRTUAL_HOST: my-app.local
      VIRTUAL_PORT: 3000
services:
  my-app:
    …
    expose:
      - 3000
networks:
  default:
    external:
      name: nginx-proxy

0 个答案:

没有答案