Env vars in devvm - VM_PROJECT "demoshop" vs. "suite"


#1

Hi there,

I’ve managed to get devvm running on my LMDE2 (jessie) host system with latest virtualbox / vagrant versions setup and the code of https://github.com/spryker-shop/suite inside the project folder.

I followed the https://academy.spryker.com/getting_started/installation_guide.html and builded and started the vm with the command:

VM_PROJECT=suite SPRYKER_REPOSITORY="git@github.com:spryker-shop/suite.git" vagrant up

So, in my /etc/hosts file there are several “*.suite.local” entries placed, but if I tried to access Yves (or Zed) I got following exception message:

Spryker\\Yves\\Application\\Plugin\\Exception\\InvalidUrlConfigurationException - Incorrect HOST_YVES config, expectedwww.de.suite.local, gotwww.de.demoshop.local. Set the URLs in your Shared/config_default_DE.php or env specific config files.

I found several “*.demoshop.local” entries inside the project folder, but any changes did not apply. I also disabled PHP opcache (checked via phpinfo();). Phpinfo told me also that “demoshop” was defined for the variables VM_DOMAIN and VM_PROJECT.

My “solution” was to add following PHP code at the beginning of the file public/Yves/index.php:

putenv('VM_DOMAIN=suite'); putenv('VM_PROJECT=suite');

With this I can access the shop frontend. I tried to find the definition of these both env vars, but I did not found it until now.

Can you tell me please where these both env variables will be set in the box?

Thanks :slight_smile:


#2

Hello,

Can you post the contents of the .vm file located in the same folder as Vagrantfile (one level up of the project folder).


Regards,
The Forum Team


#3

Hi Volodymyr,

thanks for fast reply. Here the content of my .vm file:

cat .vm
VM_PROJECT=‘suite’
VM_IP=‘10.10.0.226’
VM_MEMORY=‘3200’
VM_CPUS=‘4’
VM_NAME=‘Spryker Dev VM (suite)’
VM_DOMAIN=‘suite’
VM_SKIP_SF=‘0’
VM_IS_WINDOWS=‘0’
SPRYKER_BRANCH=‘master’
SPRYKER_REPOSITORY=‘git@github.com:spryker-shop/suite.git’


#4

Ho Volodymyr,

I’ve managed to solve my problem. I think something went wrong at my initial setup.

My solution:

I’ve had to run vagrant provision to get the variables from the .vm file loaded into the box. After a vagrant halt and a restart with VM_PROJECT=suite SPRYKER_REPOSITORY="git@github.com:spryker-shop/suite.git" vagrant up, I cound verify that “suite” was set (via echo $VM_PROJECT).

One more question:

Do I have to run the long vagrant up command every time or does it suffice once and after that vagrant up is enough?

Greetings :slight_smile:


#5

Hi Steffen,

Just

vagrant up

is enough.

WBR
Valerii