#YoloJoghurt

1 messages ยท Page 1 of 1 (latest)

viscid isleBOT
wheat gyro
#

๐Ÿ‘‹ happy to help

#

I'll be with you shortly

dusk surge
#

remove inverted comma from env variable and remove authorization and beare as well
env variable should look like
STRIPE_API_KEY=sk_test_5125891257....

wheat gyro
#

@lament pewter did that work?

viscid isleBOT
lament pewter
#

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
dense oak
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!

lament pewter