OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums OroCommerce Vagrant: Shared Working Directory – How to sync /usr/share/nginx/html/oroapp/ ?

This topic contains 3 replies, has 2 voices, and was last updated by  Frank 7 months ago.

  • Creator
  • #38509


    Vagrant: Shared Working Directory – How to sync host’s working directory with guest’s /usr/share/nginx/html/oroapp/ -folder?

    Hi Andrey,

    I am new in using Vagrant for Oro.

    Host’s ~/project-directory, and guest’s /Vagrant- directory are shared, and synchronzed automatically.

    However, I need to synchronize host’s project-directory with guest’s /usr/share/nginx/html/oroapp – directory.

    What would recommend to achive this?
    May be to put a sym link from /usr/share/nginx/html/oroapp to /vagrant? But this should not work! — ???

    Thanks a lot for ‘urgent’ help!

    Kind regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
  • #38515
    Andrey Yatsenko
    Andrey Yatsenko

    Currently, Vagrantfiles aimed to get installed Oro applications just for review/familiarization and not ready for setting up the development environment yet.

    However, if you want to configure sync between host and VM app folders, there is the following workaround:

    1) Replace in the Vagrantfile, the string

    # config.vm.synced_folder “../data”, “/home/vagrant/www”

    to the strings

    config.vm.synced_folder “.”, “/usr/share/nginx/html/oroapp”, type: “rsync”,
    rsync__exclude: [“.vagrant/”, “.git/”, “.idea/”, “vendor/”, “var/”, “public/”],
    rsync__chown: false

    2) After this run the command “vagrant reload” once

    3) After that use “vagrant rsync” (https://www.vagrantup.com/docs/cli/rsync.html) or “vagrant rsync-auto” (https://www.vagrantup.com/docs/cli/rsync-auto.html) command to run file synchronization between host and VM application folders.



    As Vagrant rsync is unidectional, your Step1 will overwrite guest-path /usr/share/nginx/html/oroapp with content of host’s /project-path/* (execpt given exclude-subfolders).

    That means, code outside the exclude-folders should be exactly the same in host’s projectfolder and guests /usr/share/nginx/html/oroapp-folder.

    Is that the case?

    Thanks a lot



    Hi Andrey,

    it seems to work really … in prod-mod.

    Trying http://localhost/index_dev.php results in a FileLoaderLoadException:

    The file “parameters.yml” does not exist (in: /usr/share/nginx/html/oroapp/src/../config) in parameters.yml (which is being imported from “/usr/share/nginx/html/oroapp/src/../config/config.yml”).

    Debugging-features are pretty nice, so it would be great to make use of them.

    Thanks a lot

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No