0

I'm running a local instance of a PHP app-engine project, I have got some buckets setup in GCP specifically for the local dev version, however instead of the data that I write to the bucket appearing online, they are being saved locally into the dev_appserver Datastore. I can see the files in the local admin interface (localhost:8000) under Datastore.

This is an issue as the application I'm developing has a companion app which needs to also access the bucket files.

The

--support_datastore_emulator=[true|false]

flag is documented under

dev_appserver.py -h

But it doesn't seem to have any effect when using =false.

So my question is: How do I stop the dev_appserver from using the local Datastore and make it use the 'real' buckets on the web?

R0w13y
  • 13
  • 1
  • 4

1 Answers1

0

Try setting the --default_gcs_bucket_name flag documented here to establish the default GCS bucket to use:

dev_appserver.py app.yaml --default_gcs_bucket_name gs://BUCKET-NAME
Maxim
  • 4,075
  • 1
  • 14
  • 23
  • Great! thanks. I'll try this tonight. Would this parameter still apply/work when using multiple buckets? – R0w13y Jun 13 '19 at 10:49
  • Adding the --default_gcs_bucket_name seems to enable the datastore emulator locally, I also tried adding the --support_datastore_emulator=false to no avail. When adding the --default_gcs_bucket_name, dev_appserver seems to convert from the sqlite datastore to the emulator datastore .db. But both are still local. If it helps, my app accesses the buckets through gs://[bucket-name] but files and folders are not being created in the cloud. – R0w13y Jun 14 '19 at 07:38