0

I'm following this tutorial https://trailhead.salesforce.com/en/content/learn/modules/user-interface-api/install-sample-app?trail_id=force_com_dev_intermediate and I have never used docker before. Steps I followed:

  1. Cloned the repo
  2. Installed docker for windows and it is perfectly installed.
  3. Tried to run this cmd on the repo docker-compose build && docker-compose up -d While running this cmd, I'm getting the same error. E:\Salesforce\RecordViewer>docker-compose build && docker-compose up -d (root) Additional property nginx is not allowed
Aneela Oad
  • 11
  • 1
  • 2
  • Note (unrelated): your site https://aneela-codes.github.io/Portfolio-Aneela-Oad/# has a resume link (https://aneela-codes.github.io/Portfolio-Aneela-Oad/resume/index.html) which is 404. – VonC Aug 19 '21 at 08:11
  • That link seems to go to some other project. I don't see a docker-compose.yml file there. You should include the necessary content to answer the question in the body of your question, and not depend on external links. – BMitch Dec 30 '21 at 14:18

1 Answers1

7

I found this answer: https://stackoverflow.com/a/38717336/279771

Basically I needed to add services: to the docker-compose.yml so it looks like this:

services:
  web:
    build: .
    command: 'bash -c ''node app.js'''
    working_dir: /usr/src/app
    environment:
      PORT: 8050
      NGINX_PORT: 8443
    volumes:
      - './views:/app/user/views:ro'
  nginx:
    build: nginx
    ports:
      - '8080:80'
      - '8443:443'
    links:
      - web:web
    volumes_from:
      - web

Dharman
  • 30,962
  • 25
  • 85
  • 135
Digital
  • 75
  • 3
  • 6
  • To work with older versions of docker-compose, you'll want a version line in the file. Otherwise some some may treat it as a version 1 (deprecated) compose file. – BMitch Dec 30 '21 at 14:20