-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathDockerfile.rainbow
More file actions
executable file
·36 lines (24 loc) · 986 Bytes
/
Dockerfile.rainbow
File metadata and controls
executable file
·36 lines (24 loc) · 986 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
ARG BASE_IMAGE
FROM $BASE_IMAGE AS base
FROM node:24-alpine AS final
LABEL maintainer="-"
# Lambda web adapter: https://github.com/awslabs/aws-lambda-web-adapter
# The public.ecr.aws/awsguru/aws-lambda-adapter:0.9.0 image reference in the docs has
# been pushed to the public CDS ECR to avoid rate limiting when pulling the image.
COPY --from=public.ecr.aws/cds-snc/aws-lambda-adapter:0.9.0 /lambda-adapter /opt/extensions/lambda-adapter
ENV AWS_LWA_ENABLE_COMPRESSION=true
ENV PORT=3000
ENV NODE_ENV=production
ARG COGNITO_APP_CLIENT_ID
ENV COGNITO_APP_CLIENT_ID=$COGNITO_APP_CLIENT_ID
ARG COGNITO_USER_POOL_ID
ENV COGNITO_USER_POOL_ID=$COGNITO_USER_POOL_ID
ARG INDEX_SITE="false"
ENV INDEX_SITE=$INDEX_SITE
# Use the LAMBDA_ENV environment variable to determine if the app is running in a Lambda environment
# Enables memory caching for the prerendering of pages
ENV LAMBDA_ENV=1
WORKDIR /src
COPY --from=base /src ./
RUN ln -s /tmp ./.next/cache
CMD ["node", "server.js"]