Using a mounted volume for files



  • I'm on DigitalOcean and I use an attached volume to store uploads. I've been using a symlink but it creates a bit of an issue:

    $ git status
    On branch v1.11.x
    Your branch is up to date with 'origin/v1.11.x'.
    
    Changes not staged for commit:
      (use "git add/rm <file>..." to update what will be committed)
      (use "git checkout -- <file>..." to discard changes in working directory)
    
            deleted:    public/uploads/files/.gitignore
    

    The problem is that when I upgrade it clobbers the files symlink. Does this NodeBB instance use an attached volume? If yes, do you symlink to it?

    Thanks.


  • Staff Admin



  • I have a mount. I mount the DO volume to the default location from their configuration instructions: /mnt/<volume-name>/ and then I nest the files dir under there.

    Then I symlink public/uploads/files to the files dir I set up on the mount.

    Problem seems to be that git treats symlinks as files so it thinks files/.gitignore is missing.


Log in to reply
 

Suggested Topics

| |