Railway env is not passed to Docker container correctly, production breaks down due to it

2 years ago

8 Replies

2 years ago

0bcb537c-51f6-4c2b-ae34-0db185dda977


2 years ago

1259462656604242000


2 years ago

i pass token correctly


2 years ago

1259463119080652800


2 years ago

my dockerfile

ARG BUN_VERSION=1.1.17

FROM oven/bun:$BUN_VERSION as base
WORKDIR /usr/src/app

ARG RONIN_TOKEN

# Copy all files from the workspace
COPY . .

RUN echo $RONIN_TOKEN
RUN echo "----------------------------------------"
RUN echo "RONIN_TOKEN: $RONIN_TOKEN"
RUN echo "----------------------------------------"


# Login to RONIN & install dependencies
RUN bunx ronin login && bun install --frozen-lockfile

# Set environment variables
ENV NODE_ENV=production
ENV PORT=3000

USER bun

EXPOSE 3000

ENTRYPOINT ["bun", "run", "./api/src/api.ts"]

2 years ago

1259463186596364300


2 years ago

the token is there it seems


2 years ago

ok its resolved, was issue with ronin


Loading...