In file'./docker-compose.yml', the service name True must be a quoted string, i.e.'True'.

Building Rails environment with Docker ** docker-compose run web rails new. --force --no-deps --database = postgresql --skip-bundle **, then In file'./docker-compose. Make a note of the error yml', the service name True must be a quoted string, ie'True'..

Cause

Typographical error

e: '3'
services:
  db:
    image: postgres
    volumes:
      - ./tmp/db:/var/lib/postgresql/data
  web:
    build: .
    command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
    volumes:
      - .:/myapp
    ports:
      - "3000:3000"
    depends_on:
      - db

e: '3'

I modified this to version: '3' and it worked

Revised

version: '3'
services:
  db:
    image: postgres
    volumes:
      - ./tmp/db:/var/lib/postgresql/data
  web:
    build: .
    command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
    volumes:
      - .:/myapp
    ports:
      - "3000:3000"
    depends_on:
      - db

Recommended Posts

In file'./docker-compose.yml', the service name True must be a quoted string, i.e.'True'.
Be careful when setting the class name when creating a document-based app in Swift
Count the number of occurrences of a string in Ruby
Docker error: service must be a mapping, not a None Type.
A memorial service for the library used when competing in Ruby
Add a time stamp to the JAR file name in Gradle