nodeJS app crush after mounting a volume
i-t-sam
TRIALOP

2 years ago

my app is crushing over and over because it cant find the package.json file when i connect the volume to the /app route, but when i disconnect it it just works.

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

3 Replies

2 years ago

You can't mount a volume to /app because /app is where your code is stored, a new volume is empty so when you mount a volume to /app the /app folder is now empty.

You instead would want to mount to something like /app/data and write your files to ./data.


i-t-sam
TRIALOP

2 years ago

You can't mount a volume to /app because /app is where your code is stored, a new volume is empty so when you mount a volume to /app the /app folder is now empty.

You instead would want to mount to something like /app/data and write your files to ./data.

hey 👋... i start by thanking you , cause you just saved a lot of time mn. i just thought that it just copies the content of the /app into the volume


2 years ago

That's a fair assumption, but volumes are regular disk mounts, not overlay mounts like what you're probably thinking of.


Loading...