azukiapp / azk

azk is a lightweight open source development environment orchestration tool. Instantly & safely run any environment on your local machine.
http://azk.io
Apache License 2.0
899 stars 63 forks source link

Mount persistent is creating a directory instead of a file #575

Open lukzgois opened 8 years ago

lukzgois commented 8 years ago

Hi, I'm using linux and azk for a Laravel project. In my Azkfile.js I used the persistent mount to save the composer.lock file. This file not exists until the system provision, and inspecting the azk persistent folder, the composer.lock was created as a folder. This make the system doesn't start after a restart.

I'm using azk 0.16.2 and ubuntu 14.04.

gullitmiranda commented 8 years ago

Currently, there's no available way to inform to persistent mount if the target object is either a file or a directory.

In order to do this, I suggest the following solutions:

1) Add to persistent mount an option: e.g.:

mounts: {
  '/azk/#{manifest.dir}/composer.lock': persistent('composer.lock', { file: true }),
},

2) Create a new kind of mount (same result as the above): e.g.:

mounts: {
  '/azk/#{manifest.dir}/composer.lock': file('composer.lock'),
},