1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 07:25:19 +02:00

feat: alpine images

This commit is contained in:
Six 2024-01-21 11:29:11 -08:00
parent 8e421a6c71
commit 7d816ff20c
No known key found for this signature in database
GPG key ID: 00148D3869C21E43
4 changed files with 18 additions and 14 deletions

View file

@ -5,7 +5,15 @@
"next", "next",
"next/core-web-vitals" "next/core-web-vitals"
], ],
"ignorePatterns": ["!**/*", "styles.css", "**/*.csv", "**/public/*", "**/.next/*", "**/*.sh"], "ignorePatterns": [
"!**/*",
"styles.css",
"**/*.csv",
"**/public/*",
"**/.next/*",
"**/*.sh",
"Dockerfile"
],
"overrides": [ "overrides": [
{ {
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "files": ["*.ts", "*.tsx", "*.js", "*.jsx"],

View file

@ -1,9 +1,7 @@
# ------------------------------------------ # ------------------------------------------
# BUILD STAGE # BUILD STAGE
# ------------------------------------------ # ------------------------------------------
# Full Node image must be used for node_modules install FROM node:18-alpine3.18 as builder
# TODO - Upgrade to v18.x (LTS) when this issue is resolved - https://github.com/prisma/prisma/issues/10649#issuecomment-1249209025
FROM node:16.18.1 as builder
WORKDIR /app WORKDIR /app
COPY ./dist/apps/client ./yarn.lock ./prisma ./package.json ./apps/client/env.sh ./ COPY ./dist/apps/client ./yarn.lock ./prisma ./package.json ./apps/client/env.sh ./
@ -14,10 +12,10 @@ RUN yarn install --production=false
# ------------------------------------------ # ------------------------------------------
# PROD STAGE # PROD STAGE
# ------------------------------------------ # ------------------------------------------
FROM node:16.18.1-slim as prod FROM node:18-alpine3.18 as prod
# Used for container health checks and env handling # Used for container health checks and env handling
RUN apt-get update && apt-get install curl gawk -y RUN apk add --no-cache curl gawk
WORKDIR /app WORKDIR /app
USER node USER node
COPY --from=builder --chown=node:node /app . COPY --from=builder --chown=node:node /app .

View file

@ -1,9 +1,7 @@
# ------------------------------------------ # ------------------------------------------
# BUILD STAGE # BUILD STAGE
# ------------------------------------------ # ------------------------------------------
# Full Node image must be used for node_modules install FROM node:18-alpine3.18 as builder
# TODO - Upgrade to v18.x (LTS) when this issue is resolved - https://github.com/prisma/prisma/issues/10649#issuecomment-1249209025
FROM node:16.18.1 as builder
WORKDIR /app WORKDIR /app
COPY ./dist/apps/server ./yarn.lock ./prisma ./ COPY ./dist/apps/server ./yarn.lock ./prisma ./
@ -12,10 +10,10 @@ RUN yarn install --production && yarn add ejs
# ------------------------------------------ # ------------------------------------------
# PROD STAGE # PROD STAGE
# ------------------------------------------ # ------------------------------------------
FROM node:16.18.1-slim as prod FROM node:18-alpine3.18 as prod
# Used for container health checks # Used for container health checks
RUN apt-get update && apt-get install curl -y RUN apk add --no-cache curl
WORKDIR /app WORKDIR /app
USER node USER node
COPY --from=builder /app . COPY --from=builder /app .

View file

@ -3,7 +3,7 @@
# ------------------------------------------ # ------------------------------------------
# Full Node image must be used for node_modules install # Full Node image must be used for node_modules install
# TODO - Upgrade to v18.x (LTS) when this issue is resolved - https://github.com/prisma/prisma/issues/10649#issuecomment-1249209025 # TODO - Upgrade to v18.x (LTS) when this issue is resolved - https://github.com/prisma/prisma/issues/10649#issuecomment-1249209025
FROM node:16.18.1 as builder FROM node:18-alpine3.18 as builder
WORKDIR /app WORKDIR /app
COPY ./dist/apps/workers ./yarn.lock ./prisma ./ COPY ./dist/apps/workers ./yarn.lock ./prisma ./
@ -12,10 +12,10 @@ RUN yarn install --production
# ------------------------------------------ # ------------------------------------------
# PROD STAGE # PROD STAGE
# ------------------------------------------ # ------------------------------------------
FROM node:16.18.1-slim as prod FROM node:18-alpine3.18 as prod
# Used for container health checks # Used for container health checks
RUN apt-get update && apt-get install curl -y RUN apk add --no-cache curl
WORKDIR /app WORKDIR /app
USER node USER node
COPY --from=builder /app . COPY --from=builder /app .