-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7c3c93f
commit 715801b
Showing
4 changed files
with
9 additions
and
515 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,47 +9,29 @@ | |
|
||
|
||
FROM node:20.11.0-alpine3.19 as base | ||
|
||
# RUN apk add --no-cache g++ make py3-pip libc6-compat | ||
RUN wget -q -t3 'https://packages.doppler.com/public/cli/rsa.8004D9FF50437357.key' -O /etc/apk/keys/[email protected] && \ | ||
echo 'https://packages.doppler.com/public/cli/alpine/any-version/main' | tee -a /etc/apk/repositories && \ | ||
apk add doppler | ||
|
||
WORKDIR /app | ||
EXPOSE 3000 | ||
|
||
COPY package*.json ./ | ||
RUN npm install | ||
COPY . . | ||
RUN npm run build | ||
|
||
|
||
|
||
FROM base as builder | ||
WORKDIR /app | ||
COPY . . | ||
COPY --from=base /app/node_modules ./node_modules | ||
RUN npm run build | ||
|
||
|
||
|
||
FROM builder as production | ||
WORKDIR /app | ||
|
||
RUN wget -q -t3 'https://packages.doppler.com/public/cli/rsa.8004D9FF50437357.key' -O /etc/apk/keys/[email protected] && \ | ||
echo 'https://packages.doppler.com/public/cli/alpine/any-version/main' | tee -a /etc/apk/repositories && \ | ||
apk add doppler | ||
|
||
ENV NODE_ENV=production | ||
|
||
# RUN addgroup -g 1001 -S nodejs | ||
# RUN adduser -S nextjs -u 1001 | ||
# USER nextjs | ||
|
||
|
||
# COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next | ||
# COPY --from=builder /app/.next ./.next | ||
# COPY --from=builder /app/node_modules ./node_modules | ||
# COPY --from=builder /app/package.json ./package.json | ||
# COPY --from=builder /app/public ./public | ||
COPY . . | ||
CMD ["sh", "scripts/start-prod"] | ||
|
||
|
||
CMD ["sh", "scripts/start-prod"] | ||
|
||
|
||
# FROM base as dev | ||
|
Oops, something went wrong.