Skip to content

Commit

Permalink
fix(docker): fix size and runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
chohner committed Jan 26, 2024
1 parent d2871a1 commit b7ff133
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ ARG APP_IMAGE=app
FROM node:20-alpine AS app-base
WORKDIR /a2j
COPY package.json package-lock.json ./
RUN npm ci --include=prod
RUN npm ci --omit=dev --omit=optional

FROM scratch AS app
WORKDIR /a2j-app
COPY --link --from=app-base /a2j/node_modules ./node_modules/
COPY ./build ./build/
COPY ./app/services ./app/services/
COPY ./start.sh ./server.js ./
COPY ./start.sh ./server.js package.json ./

FROM scratch AS content
COPY ./content.json /
Expand Down
2 changes: 1 addition & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ export POSTHOG_API_KEY="${POSTHOG_API_KEY:=$(cat /etc/posthog-secrets/password)}
export COOKIE_SESSION_SECRET="${COOKIE_SESSION_SECRET:=$(cat /etc/cookie-session-secret/password)}"
export REDIS_PASSWORD="${REDIS_PASSWORD:=$(cat /etc/redis-password-secret/password)}"

node ./server.js
NODE_ENV=production node ./server.js

0 comments on commit b7ff133

Please sign in to comment.