@@ -6,33 +6,21 @@ WORKDIR /app
6
6
COPY package.json /app
7
7
RUN npm install
8
8
9
- # Rebuild the source code only when needed
10
- FROM node:16-alpine AS builder
11
- WORKDIR /app
12
- COPY --from=deps /app/node_modules ./node_modules
13
- COPY . .
14
- RUN npm run build
15
-
16
9
# Production image, copy all the files and run next
17
10
FROM node:16-alpine AS runner
18
11
WORKDIR /app
19
12
13
+ COPY --from=deps /app/node_modules ./node_modules
14
+
20
15
ENV NODE_ENV production
21
16
22
- RUN addgroup -g 1001 -S nodejs
23
- RUN adduser -S nextjs -u 1001
17
+ # RUN addgroup -g 1001 -S nodejs
18
+ # RUN adduser -S nextjs -u 1001
24
19
25
20
# You only need to copy next.config.js if you are NOT using the default configuration
26
- COPY --from=builder /app/next.config.js ./
27
- COPY --from=builder /app/public ./public
28
- COPY --from=builder /app/package.json ./package.json
29
-
30
- # Automatically leverage output traces to reduce image size
31
- # https://nextjs.org/docs/advanced-features/output-file-tracing
32
- COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
33
- COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
21
+ COPY . .
22
+ RUN npm run build
34
23
35
- COPY ./scripts ./scripts
36
24
COPY ./public/schema.json ./scripts/ingestion
37
25
38
26
ENV PYTHONUNBUFFERED=1
@@ -41,20 +29,18 @@ RUN apk add make automake gcc g++ subversion python3-dev
41
29
RUN python3 -m ensurepip
42
30
RUN pip3 install --no-cache --upgrade pip setuptools
43
31
RUN pip3 install -r ./scripts/ingestion/requirements.txt
44
- USER nextjs
32
+ # USER nextjs
45
33
46
34
47
- ENV NEXT_PUBLIC_DATA_API="https://maayanlab.cloud/sigcom-lincs/data-api"
48
- ENV NEXT_PUBLIC_METADATA_API="https://maayanlab.cloud/sigcom-lincs/metadata-api"
49
35
ENV PREFIX=/
50
36
ENV NEXT_PUBLIC_PREFIX=/
51
37
ENV PORT=3000
52
38
# Next.js collects completely anonymous telemetry data about general usage.
53
39
# Learn more here: https://nextjs.org/telemetry
54
40
# Uncomment the following line in case you want to disable telemetry.
55
41
56
- COPY --chown=nextjs:nodejs ./entrypoint.sh ./entrypoint.sh
42
+ # COPY --chown=nextjs:nodejs ./entrypoint.sh ./entrypoint.sh
57
43
ENV NEXT_TELEMETRY_DISABLED 1
58
44
# CMD ["node", "server.js"]
59
- RUN [ " chmod" , "+x" , " ./entrypoint.sh" ]
45
+ RUN set -x && chmod +x ./entrypoint.sh
60
46
ENTRYPOINT ["./entrypoint.sh" ]
0 commit comments