Stirling PDF expects multiple persistent directories. Build failed
kaviarahul123
FREEOP

a month ago

Hi Railway team,

I'm deploying Stirling PDF, which expects multiple persistent directories. In Docker Compose, it uses several volume mounts like this:

volumes:

  • ./stirling-data/tessdata:/usr/share/tessdata
  • ./stirling-data/configs:/configs
  • ./stirling-data/logs:/logs
  • ./stirling-data/customFiles:/customFiles
  • ./stirling-data/pipeline:/pipeline

However, in Railway I can only add one persistent volume to the service.

Is there any way to:

1.Attach multiple persistent volumes to a single service?

2.Use one Railway volume and mount it to multiple container paths?

3.Create additional persistent directories from a single volume (using symlinks, bind mounts, startup scripts, or another supported approach)?

4.What is the recommended way to deploy applications that require multiple persistent directories?

Solved$10 Bounty

Pinned Solution

sonia_iqbal
FREE

a month ago

You don't need multiple volumes for stirling-pdf. You can mount a volume /stirling-data , other directories will be created by itself.

If you're using stirlingtools/stirling-pdf:latest-fat image, there can be ram issue which you can fix by below environment variable:

JAVA_TOOL_OPTIONS="-Xms512m -Xmx4g" # Min 512MB, Max 4GB RAM

https://docs.stirlingpdf.com/Configuration/#memory-management

Here you can see directories are created itself.

image.png

Attachments

4 Replies

Railway
BOT

a month ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway about 1 month ago


Unfortunately, no, there isn't a way to attach multiple volumes to one service.

You'd just store all those files under a mount directory (eg, /data).


0x5b62656e5d

Unfortunately, no, there isn't a way to attach multiple volumes to one service. You'd just store all those files under a mount directory (eg, `/data`).

kaviarahul123
FREEOP

a month ago

I tried but railway does not support volume feature in docker file and uses its own volume that manually needs to setup. Where and how to attach multiple files inside data directory ?


sonia_iqbal
FREE

a month ago

You don't need multiple volumes for stirling-pdf. You can mount a volume /stirling-data , other directories will be created by itself.

If you're using stirlingtools/stirling-pdf:latest-fat image, there can be ram issue which you can fix by below environment variable:

JAVA_TOOL_OPTIONS="-Xms512m -Xmx4g" # Min 512MB, Max 4GB RAM

https://docs.stirlingpdf.com/Configuration/#memory-management

Here you can see directories are created itself.

image.png

Attachments


sonia_iqbal

You don't need multiple volumes for stirling-pdf. You can mount a volume **/stirling-data** , other directories will be created by itself. If you're using _stirlingtools/stirling-pdf:latest-fat_ image, there can be ram issue which you can fix by below environment variable: _JAVA_TOOL_OPTIONS="-Xms512m -Xmx4g" # Min 512MB, Max 4GB RAM_ https://docs.stirlingpdf.com/Configuration/#memory-management Here you can see directories are created itself. ![image.png](https://station-server.railway.com/attachments/att_01kxfk5xt3fvjt7y0fnc84jvhh)

kaviarahul123
FREEOP

a month ago

Thanks it worked.i found due to currently on Hobby plan i was out of RAM and memory. Thats causes falling of deployment everytime.


Status changed to Solved brody about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...