gabe
gabe
Explore posts from servers
RRailway
Created by gabe on 5/17/2024 in #✋|help
PNPM 9 Support
Hey 👋 I had to update my pnpm version locally to v9, and due to work reasons I can't switch back to v8. Is there any reason for railway not to support v9? Its been out already for more than a month, I'd expect that not to cause problems on deployment, but seems like I was wrong 😅 . Also, other than switching my project to docker, is there any other solution?
7 replies
RRailway
Created by gabe on 10/12/2023 in #✋|help
Cache mount ID is not prefixed with cache key
I'm trying to build a docker image with the recommended instructions from pnpm (https://pnpm.io/docker), adding RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile to my dockerfile, but when building on railway i'm getting a Cache mount ID is not prefixed with cache key build error when building the docker image, which doesn't tell me much just from that. Searching here, I found out this thread https://discord.com/channels/713503345364697088/1104400912149123152/1104400912149123152, which looks the same problem as mine, and that it was suggested to attach the service ID into the id part, which I did with the following:
RUN --mount=type=cache,id=2d13c748-906b-4f06-bdbc-9a9cbdb84534-pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN --mount=type=cache,id=2d13c748-906b-4f06-bdbc-9a9cbdb84534-pnpm,target=/pnpm/store pnpm install --frozen-lockfile
And also this:
RUN --mount=type=cache,id=s/2d13c748-906b-4f06-bdbc-9a9cbdb84534/pnpm,target=/pnpm/store pnpm install --frozen-lockfile
RUN --mount=type=cache,id=s/2d13c748-906b-4f06-bdbc-9a9cbdb84534/pnpm,target=/pnpm/store pnpm install --frozen-lockfile
But I think this is still not the correct format, as both resulted in the same error. Am I formatting this wrong? The service-id is 2d13c748-906b-4f06-bdbc-9a9cbdb84534
147 replies
RRailway
Created by gabe on 10/12/2023 in #✋|help
Using `npx turbo-ignore` to skip deployments
I have a project configured with turborepo, and currently I'm using watch paths to only deploy if there are changes on a specific folder, but I'd like to use turbo-ignore (https://turbo.build/repo/docs/core-concepts/monorepos/skipping-tasks#using-turbo-ignore) to control that, since it is more precise on defining when a package changed. Is it possible to do that?
13 replies
RRailway
Created by gabe on 11/1/2022 in #✋|help
Access env variables inside Dockerfile
I'm trying to create a dockerfile which needs access to an env variable to properly build (its not needed for the app itself). I read that I could use the ARG command and pass the variable through docker --build-arg <ARG>, but this still doesn't seem to use the environment variables, as I still need to additionally pass it through the --build-arg flag (and I'm not sure if I can do that through railway). Am i missing something? I just wanted to do something like
# Clone the separate lists repo
ARG GIT_LISTS_HTTPS_REPO
RUN git clone $GIT_LISTS_HTTPS_REPO .
# Clone the separate lists repo
ARG GIT_LISTS_HTTPS_REPO
RUN git clone $GIT_LISTS_HTTPS_REPO .
1 replies