Code Monkey home page Code Monkey logo

Comments (7)

koistya avatar koistya commented on May 8, 2024

@Kareem3d in docker-compose.yml there is a line:

      - ./config/postgres-initdb.sh:/docker-entrypoint-initdb.d/initdb.sh

..telling Docker to mount ./config/postgres-initdb.sh file inside postgres container at this location - /docker-entrypoint-initdb.d/initdb.sh. Can you double-check that the file C:\playground\example.api\config\postgres-initdb.sh actually exists on disk? You can also tweak this mount point to be read-only by appending :ro at the end:

      - ./config/postgres-initdb.sh:/docker-entrypoint-initdb.d/initdb.sh:ro

...also, do you use the latest version of Docker for Windows? You can try to restart Docker. Or, run docker-compose down and then docker-compose up again.. or, see the list of created volumes by running docker volume ls and remove volumes that you don't need with docker volume rm <name>, then run docker-compose up again.. Does any of this help to solve the issue?

from graphql-starter-kit.

kareemaly avatar kareemaly commented on May 8, 2024

@koistya Still no luck :( , That's what I have tried

  • I made sure the postgres-initdb.sh file exists
  • I added the :ro at the end then ran docker-compose down, removed all volumes and ran docker-compose up again

I'm installing this boilerplate to just play around with graphql so probably I will remove all postgres db code and try to run again without it, that should fix the problem

from graphql-starter-kit.

koistya avatar koistya commented on May 8, 2024

@Kareem3d another thing you could try is to enclose Windows path in quotes:

      - "./config/postgres-initdb.sh":/docker-entrypoint-initdb.d/initdb.sh

Ref docker/compose#2487

from graphql-starter-kit.

koistya avatar koistya commented on May 8, 2024

Sorry, cannot reproduce. If anyone else is having the same issue, please re-open. Closing for now.

from graphql-starter-kit.

rocinante42 avatar rocinante42 commented on May 8, 2024

I'm having related issue but it says:
ERROR: for db Cannot create container for service db: invalid bind mount spec

from graphql-starter-kit.

rocinante42 avatar rocinante42 commented on May 8, 2024

ERROR: for db Cannot create container for service db: invalid bind mount spec "C:\\users\\r300\\documents\\kelsus\\api\ \server\\config\\postgres-initdb.sh:/docker-entrypoint-initdb.d/initdb.sh:rw": invalid volume specification: 'C:\users\r 300\documents\kelsus\api\server\config\postgres-initdb.sh:/docker-entrypoint-initdb.d/initdb.sh:rw' ERROR: Encountered errors while bringing up the project.

from graphql-starter-kit.

koistya avatar koistya commented on May 8, 2024

@rocinante42 are you using the latest version of Docker for Windows?

PS C:\Users\Docker> docker --version
Docker version 17.03.0-ce, build 60ccb22

PS C:\Users\Docker> docker-compose --version
docker-compose version 1.11.2, build dfed245

PS C:\Users\Docker> docker-machine --version
docker-machine version 0.10.0, build 76ed2a6

You may also want to check Docker for Windows > FAQ and Troubleshooting sections. For example, Docker for Windows doesn't support file events in mounted volumes, which prevents "live reload" from working (with default settings), in that case, you would need to set CHOKIDAR_USEPOLLING=true environment variable as a workaround by creating docker-compose.override.yml file in the root of your project with the following contents:

version: '3'
services:
  api:
    environment:
      - CHOKIDAR_USEPOLLING=false

This project works fine for me on Windows. Not sure how to replicate this issue. I see there is an extra space in the path \\api\ \server\\.. maybe that's the issue?

from graphql-starter-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.