fix: /app -> /zipline

This commit is contained in:
diced 2023-01-28 10:28:29 -08:00
parent e3f262322a
commit 06e84b41aa
No known key found for this signature in database
GPG key ID: 370BD1BA142842D1
5 changed files with 19 additions and 27 deletions

View file

@ -5,7 +5,7 @@ FROM ghcr.io/diced/prisma-binaries:4.8.x as prisma
FROM node:18-alpine3.16 as base
# Set the working directory
WORKDIR /app
WORKDIR /zipline
# Copy the necessary files from the project
COPY prisma ./prisma
@ -48,9 +48,6 @@ FROM base
RUN apk add --no-cache perl procps
# Set the working directory
WORKDIR /app
COPY --from=builder /prisma-engines /prisma-engines
ENV PRISMA_QUERY_ENGINE_BINARY=/prisma-engines/query-engine \
PRISMA_MIGRATION_ENGINE_BINARY=/prisma-engines/migration-engine \
@ -61,13 +58,13 @@ ENV PRISMA_QUERY_ENGINE_BINARY=/prisma-engines/query-engine \
NEXT_TELEMETRY_DISABLED=1
# Copy only the necessary files from the previous stage
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /zipline/dist ./dist
COPY --from=builder /zipline/.next ./.next
COPY --from=builder /zipline/package.json ./package.json
COPY --from=builder /tmp/node_modules ./node_modules
COPY --from=builder /app/node_modules/.prisma/client ./node_modules/.prisma/client
COPY --from=builder /app/node_modules/@prisma/client ./node_modules/@prisma/client
COPY --from=builder /zipline/node_modules ./node_modules
COPY --from=builder /zipline/node_modules/.prisma/client ./node_modules/.prisma/client
COPY --from=builder /zipline/node_modules/@prisma/client ./node_modules/@prisma/client
# Run the application
CMD ["node", "--enable-source-maps", "dist/index.js"]

View file

@ -5,3 +5,7 @@ import validateConfig from 'config/validateConfig';
if (!global.config) global.config = validateConfig(readConfig());
export default global.config as Config;
declare global {
var config: Config;
}

View file

@ -24,3 +24,7 @@ if (!global.datasource) {
}
export default global.datasource as Datasource;
declare global {
var datasource: Datasource;
}

View file

@ -5,3 +5,7 @@ if (!global.prisma) {
}
export default global.prisma as PrismaClient;
declare global {
var prisma: PrismaClient;
}

17
zip-env.d.ts vendored
View file

@ -1,17 +0,0 @@
import type { PrismaClient } from '@prisma/client';
import type { Datasource } from 'lib/datasources';
import type { Config } from '.lib/types';
declare global {
namespace NodeJS {
interface Global {
prisma: PrismaClient;
config: Config;
datasource: Datasource;
}
interface ProcessEnv {
ZIPLINE_DOCKER_BUILD: string | '1';
}
}
}