services:
  nginx:
    build: nginx-build
    volumes:
      - ./static:/usr/share/nginx/html
    ports:
      - 8090:80

  nginx2:
    build: nginx-build
    volumes:
      - staticVol:/usr/share/nginx/html:ro
      - /usr/src/app/node_modules
      - otherVol:/usr/share/nginx/test
    ports:
      - 9090:80
    configs:
      - myconfig
    secrets:
      - mysecret

volumes:
  staticVol:
  otherVol:
    name: myVolume

configs:
  myconfig:
    file: ./static/index.html

secrets:
  mysecret:
    file: ./static/index.html