Commit b5fd4597 authored by wycers's avatar wycers
Browse files

origin

parent 67bb06a1
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ CMD pnpm prisma:deploy

FROM builder as building_stage
ENV NODE_ENV production
ENV ORIGIN http://localhost:3000
ENV ORIGIN https://lms.sustech.cloud
RUN pnpm run build \
    && pnpm prune --production

@@ -31,7 +31,7 @@ RUN echo "Asia/shanghai" > /etc/timezone
USER node
ENV PORT 3000
ENV NODE_ENV production
ENV ORIGIN http://localhost:3000
ENV ORIGIN https://lms.sustech.cloud
WORKDIR /home/app

COPY --from=building_stage --chown=node:node /home/node/package*.json ./
+6 −1
Original line number Diff line number Diff line
import { building } from '$app/environment';
import Redis from 'ioredis';

export const redis = new Redis(Number(process.env.REDIS_PORT), process.env.REDIS_HOST);
export let redis: Redis

if (!building) {
    redis = new Redis(Number(process.env.REDIS_PORT), process.env.REDIS_HOST);
}
 No newline at end of file