FrankHeijden
FrankHeijden
Explore posts from servers
RRailway
Created by FrankHeijden on 2/20/2024 in #✋|help
Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>
New to railway, trying to deploy a docker image which builds a Node app. The quickstart from github immediately detected the Dockerfile -- yet it seems to immediately fail with the full build log below:
[Region: us-west1]
Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>
[Region: us-west1]
Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>
My dockerfile does not contain mounts with type cache, it only uses mounts with secrets. Is this unsupported by railway?
FROM node:20

RUN apt-get update \
&& apt-get install -y dumb-init

EXPOSE 8081
WORKDIR /app

# Build backend
RUN --mount=type=secret,id=NPM_GITHUB_TOKEN \
NPM_GITHUB_TOKEN=$(cat /run/secrets/NPM_GITHUB_TOKEN) \
npm install
RUN --mount=type=secret,id=SHOPIFY_ACCESS_TOKEN \
ABC_ACCESS_TOKEN=$(cat /run/secrets/ABC_ACCESS_TOKEN) \
npm run build

# Build frontend
WORKDIR ./frontend
RUN --mount=type=secret,id=NPM_GITHUB_TOKEN \
NPM_GITHUB_TOKEN=$(cat /run/secrets/NPM_GITHUB_TOKEN) \
npm install
RUN npm run build

# Run
WORKDIR ..
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["npm", "run", "serve"]
FROM node:20

RUN apt-get update \
&& apt-get install -y dumb-init

EXPOSE 8081
WORKDIR /app

# Build backend
RUN --mount=type=secret,id=NPM_GITHUB_TOKEN \
NPM_GITHUB_TOKEN=$(cat /run/secrets/NPM_GITHUB_TOKEN) \
npm install
RUN --mount=type=secret,id=SHOPIFY_ACCESS_TOKEN \
ABC_ACCESS_TOKEN=$(cat /run/secrets/ABC_ACCESS_TOKEN) \
npm run build

# Build frontend
WORKDIR ./frontend
RUN --mount=type=secret,id=NPM_GITHUB_TOKEN \
NPM_GITHUB_TOKEN=$(cat /run/secrets/NPM_GITHUB_TOKEN) \
npm install
RUN npm run build

# Run
WORKDIR ..
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["npm", "run", "serve"]
26 replies
CDCloudflare Developers
Created by FrankHeijden on 11/13/2023 in #general-help
CF Access get an Application Token from a Service Token
I am looking for a way to convert the Service Token into an Application Token, which is required to sign the short lived certificate for ssh access. I found this: https://developers.cloudflare.com/cloudflare-one/identity/service-tokens/#connect-your-service-to-access but this doesn't specify which endpoint I could call in the case of an SSH application. Ideally, I'd like to supply the clientId and clientSecret to cloudflared access ssh-gen directly, but there does not seem such flags, and by looking at the code an application token is required. There's also a related issue on this topic on github: https://github.com/cloudflare/cloudflared/issues/1056
1 replies