diff --git a/Dockerfile b/Dockerfile index 8fc6137..273f4c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,14 +4,17 @@ RUN corepack enable COPY package.json yarn.lock ./ RUN yarn install COPY . . -ENV BSPB_MERCHANT_ID=TT00001 -ENV BSPB_MERCHANT_PASSWORD=zTGRe1OBZg3 -ENV BSPB_API_URL=https://pgtest.bspb.ru:5443 RUN yarn build FROM node:22-alpine WORKDIR /app COPY --from=build /app/.output/ ./ + ENV PORT=80 +ENV BSPB_MERCHANT_ID=TT00001 +ENV BSPB_MERCHANT_PASSWORD=ztTGre1OBZg3 +ENV BSPB_API_URL=https://pgtest.bspb.ru:5443 + EXPOSE 80 + CMD ["node", "/app/server/index.mjs"] diff --git a/server/api/bspb.ts b/server/api/bspb.ts index e75aaed..c1512f3 100644 --- a/server/api/bspb.ts +++ b/server/api/bspb.ts @@ -32,7 +32,7 @@ export default defineEventHandler(async () => { httpsAgent: agent, headers: { 'Content-Type': 'application/json', - 'Authorization': `Basic ${Buffer.from(`${merchantId}:${merchantPassword}`).toString('base64')}`, + 'Authorization': `Basic ${Buffer.from(`TerminalSys/${merchantId}:${merchantPassword}`).toString('base64')}`, }, })