Skip to content

Docker volume mounted Cloud Code directory doesn't work #840

@drdaz

Description

@drdaz

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Dashboard!

  • [ * ] You're running version >=1.0.23 of Parse Dashboard.

  • [ * ] You're running version >=2.3.2 of Parse Server.

  • [ * ] You've searched through existing issues. Chances are that your issue has been reported or resolved before.

Environment Setup

docker-compose.yml, set up as follows, using 'volumes' mapping to inject Cloud Code:

version: "3"

volumes:
  myappdbdata:
  myappconfigdata:

services:
  # MongoDB
  myappdb:
    image: mongo:3.0.8
    volumes:
      - myappdbdata:/data/db
      - myappconfigdata:/data/configdb
  myapp-parse-server:
    image: parseplatform/parse-server:2.7.2
    environment:
      - PARSE_SERVER_MASTER_KEY=someString
      - PARSE_SERVER_APPLICATION_ID=myapp
      - VERBOSE=1
      - PARSE_SERVER_DATABASE_URI=mongodb://myappdb:27017/dev
      - PARSE_SERVER_URL=http://myapp-parse-server:1337/parse
      - PARSE_SERVER_CLOUD_CODE_MAIN = /parse-server/cloud/
    depends_on:
      - myappdb
    ports:
      - 5000:1337
    volumes:
      - ./cloud:/parse-server/cloud

Steps to reproduce

  • Add some appropriate Cloud Code (main.js) to ./cloud/.
  • docker compose up
  • Make some call to trigger your Cloud Code.

The call fails.

I've tried adding some garbage to my main.js file which would otherwise cause some error output from parse-server. This yielded no result, so the server doesn't actually use the mapped files.

I've checked the /parse-server/cloud directory on the guest / container and it contains the expected files. It's confusing.

Any idea how to achieve this? Do I have to build a custom image to use Cloud Code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions