Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

393
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda