azukiapp/azk

Mount persistent is creating a directory instead of a file

lukzgois opened this issue · 1 comments

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.

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 }),
},
  1. Create a new kind of mount (same result as the above):
    e.g.:
mounts: {
  '/azk/#{manifest.dir}/composer.lock': file('composer.lock'),
},