Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

389
Views
How to set volume for dokku-persistent-storage

I am trying to use dokku-persistent-storage so my uploads for my rails app stay on the server, but I don't quite understand how to build the path since I am new to Dokku and Docker. (I am running this on an Ubuntu droplet on Digital Ocean)


I'm not sure if it should be something like this:

[SERVER IP ADDRESS]/home/dokku/myapp/public_folder

or

/home/dokku/myapp/public_folder

or if i'm way off and it should be something completely different.


This is what the github section says about it:

In your applications folder (/home/dokku/app_name) create a file called PERSISTENT_STORAGE.

Inside this file list one volume-map/volume per line to mount. For example:

/host/path:/container/path
/another/container/path

The above example will result in the following arguments being passed to docker during deploy and docker run:

-v /host/path:/container/path -v /another/container/path

Move information on docker volumes can be found here: http://docs.docker.io/en/latest/use/working_with_volumes/

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

I am not into Ruby or dokku, but if I understood correctly, you want your docker to have a persistent storage on the host machine.

PERSISTENT_STORAGE file, as to the documentation that you've quoted, contains mappings from host file-system directories to your container file-system directories (translated to -v arguments of the CLI).

Therefore, you should map the directory of your uploads in the container, to the desired directory on the host.

For example, if your app's uploads are saved to this dir (inside the docker container):

/home/dokku/myapp/public_folder

and you'd like them to be kept in your host at:

/home/some/dir

then, as I understand, the content of PERSISTENT_STORAGE file should be:

/home/some/dir:/home/dokku/myapp/public_folder

I hope I got you right.

over 4 years ago · Santiago Trujillo Report

0

Use Dokku's storage:mount option.

  1. You'll need to SSH into your dokku host: ssh dokku@host

  2. Run the following command to link the storage directory for that app to the app/public/uploads folder, for example:

    storage:mount <app> /var/lib/dokku/data/storage:/app/public/uploads

The Dokku docs cover this well at: at http://dokku.viewdocs.io/dokku/advanced-usage/persistent-storage/

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!