Unable to deploy a Node application
Hi, I've been trying to deploy a simple Medusa.js app to Railway for quite some time. I wasn't successful. Another dev working with me unfortunately met the same fate. There's very little documentation on Railway, and none for mounts for using Dockerfile.
[Region: us-west1]
Cache mount ID is not prefixed with cache key
I'm an experienced developer. I usually host on AWS, but I wanted to try something new. What is cache mount id prefix? What's cache key?
Thank you
108 Replies
Project ID:
26dc4f5f-e728-4eb9-aaf6-126e6e687fed
26dc4f5f-e728-4eb9-aaf6-126e6e687fed
i take it you are deploying from a Dockerfile?
Yes
I also tried deploying using NIX but I don't have the skillset necessary
Also I'm sorry for my tone I'm just very tired
send your Dockerfile please
thank you for that, but please going forward try to keep a cool tone
Dockerfile for the app:
https://pastebin.com/rz8CuwBM
Pastebin
syntax=docker/dockerfile:1# Comments are provided throughout this...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
first off, where you able to deploy your app without any of the cache mount stuff?
I used https://docs.medusajs.com/create-medusa-app to create the project and
docker init
(Docker desktop) to create the Dockerfile template. I'm using PNPM. The project build locally, the container also builds locally from the Dockerfile. I can verify it runs fine outside of RailwayInstall Medusa with create-medusa-app | Medusa
Learn how to create a composable commerce platform using Medusa. This quickstart guide will help you set up your Medusa backend and the admin dashboard.
No it resulted in package.json missing despite being present
I would very much like to keep the cache mounts
But I can switch to just copying all the project files and try that. I tried modyfing the code and running it without the mounts, tried a couple variants. But I'm not a docker expert
Railway returns very concise error messages or doesn't return any at all. When I try just copying the files instead of cache mounts, it doesn't say anything just build failed
railway does not support the bind mount type, i know that its sometimes recommended to do that vs copying in the file, but the gains are negligible at best
I found a discussion saying that it does, that's what confused me the most
https://www.answeroverflow.com/m/1104400912149123152
Cache mount ID is not prefixed with cache key when deploying test i...
Hello all,
today I tried to boot up my test instance but every attempt at doing so lead the deploys to fail immediately with the error
Cache mount ID is not prefixed with cache key
(no further information are present in build logs).
The Dockerfile used to build the project is the following (as copied from GitHub https://github.com/Stickerifie...<1104400912149123152/1108081571665281085>
im sorry but im not seeing where its mentioned that the bind mount type is supported, im only seeing talk about the cache mount type
Alright. What is confusing me is that it only complains about Cache ID
When I remove cache mounts and keep bind mounts still says
Cache mount ID is not prefixed with cache key
bind mounts are not supported, lets get this dockerfile working without any mounts first please
one step at a time
instead of bind mounts, copy the file in with
COPY
COPY package.json pnpm-lock.yaml ./