Syntax in docker-compose.yml

So being a cost-conscious consumer, rather then spending a lot of money on a powerful virtual server that I don’t need, I am using a low end one with a large virtual external volume. About the same cost, but much more space.

Now normally, grampsweb puts its data on the root volume under /var/lib/docker/volumes (/var/lib/docker/volumes/grampsweb_gramps_db, etc.) On my production system however, those directories are actually softlinks to directories on that virtual external volume (/var/lib/docker/volumes/grampsweb_gramps_db/_data points to /mnt/volume_nyc3_01/grampsweb/gramps_db). Now this works fine, but I would really prefer if my volumes section in docker-compose.yml pointed to them directly

volumes:
- gramps_users:/app/users # persist user database
- gramps_index:/app/indexdir # persist search index
- gramps_thumb_cache:/app/thumbnail_cache # persist thumbnails
- gramps_secret:/app/secret # persist flask secret
- gramps_db:/root/.gramps/grampsdb # persist Gramps database
- /root/gramps_media:/app/media # persist media files

What is the right syntax here?

- /mnt/volume_nyc3_01/grampsweb/gramps_db/users:/app/users # persist user database
- /mnt/volume_nyc3_01/grampsweb/gramps_db/indexdir:/app/indexdir # persist search index
- /mnt/volume_nyc3_01/grampsweb/gramps_db/thumbnail_cache:/app/thumbnail_cache # persist thumbnails
- /mnt/volume_nyc3_01/grampsweb/gramps_db/secret:/app/secret # persist flask secret
- /mnt/volume_nyc3_01/grampsweb/gramps_db/grampsdb:/root/.gramps/grampsdb # persist Gramps database
- /mnt/volume_nyc3_01/grampsweb/gramps_db/media:/app/media # persist media files
1 Like

Would you please verify that syntax?

My /apps/user directory is

  • /mnt/volume_nyc3_01/grampsweb/gramps_users/_data.

If I am parsing your response correctly, you are pointing to

  • /mnt/volume_nyc3_01/grampsweb/gramps_db/users/_data

Note differences in boldface