1

I'm using DreamFactory REST API in a Docker container and I need to disable wrapper "resource" in payload. How can I achieve this?

I have replaced the following in all of these four files:

opt/bitnami/dreamfactory/.env-dist
opt/bitnami/dreamfactory/vendor/dreamfactory/df-core/config/df.php
opt/bitnami/dreamfactory/installer.sh
bitnami/dreamfactory/.env

DF_ALWAYS_WRAP_RESOURCES=true

with:

DF_ALWAYS_WRAP_RESOURCES=false

but this doesn't fix my problem.

Luca Folin
  • 101
  • 1
  • 8

1 Answers1

1

The change you describe is indeed the correct one as found in the DreamFactory wiki. Therefore I suspect the configuration has been cached. Navigate to your DreamFactory project's root directory and run this command:

$ php artisan config:clear

This will wipe out any cached configuration settings and force DreamFactory to read the .env file in anew. Also, keep in mind you only need to change the .env file (or manage your configuration variables in your server environment). Those other files won't play any role in configuration changes.

Jason Gilmore
  • 3,698
  • 3
  • 23
  • 28
  • ok but how can I make a $ php artisan config:clear in a docker container ? I have already made a clear cache from UI interface but without luck – Luca Folin Jan 08 '19 at 11:09
  • Hi @LucaFolin to run a command inside your container you'll typically execute `docker exec -i -t container_name /bin/bash`. Once the terminal has opened, you can navigate to the DreamFactory root directory and clear the cache. However I am confused though, did you modify the `.env` settings and then redeploy your container? Or did you enter Docker container via aforementioned approach and edit it there? – Jason Gilmore Jan 08 '19 at 20:50
  • You are right. With this command it works: docker exec -i -t container_name dreamfactory php /opt/bitnami/dreamfactory/artisan cache:clear docker exec -i -t container_name dreamfactory php /opt/bitnami/dreamfactory/artisan config:clear – Luca Folin Jan 09 '19 at 12:20