Added shared folder on mounted volume

Hello,

I have small sized server with DO that I’ve added a volume too, I’d like to store my images on this mounted volume as I can increase the size without having to increase the size of my droplet.

I’ve tried to do this within the main.yml file by doing the followig:

project_shared_children:
  - path: mnt/volume_lon1_03/uploads
    src: uploads
    mode: '0755'
    type: directory

When I deploy I don’t get any errors and can see it in the console as follows:

changed: [=] => (item={'path': 'mnt/volume_lon1_03/uploads', 'src': 'uploads', 'mode': '0755', 'type': 'directory'})
changed: [=] => (item={'path': 'mnt/volume_lon1_03/cache', 'src': 'cache', 'mode': '0755', 'type': 'directory'})

However it isn’t linked

project_shared_children is for sym linking a folder in /srv/www/site/shared to a subpath in each deploy and that path is relative within your project. You can see this in the default entry:

project_shared_children:
  - path: "{{ project_public_path }}/{{ project_upload_path }}"
    src: uploads

So it symlinks /srv/www/site/shared/uploads (the src) => /srv/www/site/releases/123/web/app/uploads (the path).

To do what you want it to do, you’d have to mount that DO volume to /srv/www/site/shared/uploads , or manually symlink from /mnt/whatever to that first.