Search code examples
parse-platformgoogle-cloud-storage

Configure GCS as Parse Server storage


I am trying to use GCS as a storage for my files in Parse Server. I followed the tutorial, installing the parse-server-gcs-adapter and setting the environment variables in my .bashrc:

export PARSE_SERVER_FILES_ADAPTER=parse-server-gcs-adapter

export GCP_PROJECT_ID=my-project-id

export GCP_KEYFILE_PATH=path-to-keyfile.json

export GCS_BUCKET=my-bucket-name

export GCS_DIRECT_ACCESS=true

I can upload files in my Parse Dashboard, and they are correctly saved in the class, but the files cannot be seen in the bucket browser.

Some sources such as this one talk about a config file, but I cannot find info about this file anywhere.

I want to know if there is any means to debug what is happening, or if there is anything obvious that I am missing.


Solution

  • After some more research I could get the solution for the issue.

    The first thing (debug what was happening) was to take a look (tail -f) at the log file, located at /opt/bitnami/apps/parse/htdocs/logs/parse.log. There, I could see nothing was happening, thus confirming my suspicion about not changing the right file. Then, I located the config file that I was looking for to be /opt/bitnami/apps/parse/htdocs/server.js, being able to configure it as written in the Parse docs.

    As I had another problem with the GCS Adapter, I also found an issue with Bitnami machines, that was identical to this answer to an issue in Github. Now it's all working.