#YoloJoghurt
1 messages ยท Page 1 of 1 (latest)
remove inverted comma from env variable and remove authorization and beare as well
env variable should look like
STRIPE_API_KEY=sk_test_5125891257....
@lament pewter did that work?
hi, thanks for your replies.
You need to provide your API key in the Authorization header, using Bearer auth (e.g. 'Authorization: Bearer YOUR_SECRET_KEY').
cross-site problem
is it possible to add auth bearer type to .env variable?
.env is in the root folder next to the docker-compose.yaml, reading and passing env variables to the dockerfile for sveltekit production build with stripe dependency installed ("stripe": "^11.16.0")
runs fine on local build
my guess is that .env is not copied to the dockerimage while build, let me check that ๐
FROM node:${NODE_VERSION} as base
RUN npm i -g pnpm
# Build step
FROM base as builder
WORKDIR /app
# COPY package.json pnpm-lock.yaml ./
# RUN pnpm fetch --dev
COPY package.json ./
RUN pnpm install
ADD . .
RUN pnpm build
# Build step complete, copy to working image
FROM base
WORKDIR /app
# COPY package.json pnpm-lock.yaml ./
# RUN pnpm fetch --prod
COPY package.json ./
RUN pnpm install --prod
COPY --from=builder /app/build .
RUN pnpm install --ignore-scripts -r --offline --prod
CMD ["node", "index.js"]```
fyi
Hey, taking over here. Let me know if there's any follow-up Qs I can answer!
Hi @dense oak thanks for taking over. Is it possible to add the Auth Bearer type to the .env variable?