Skip to content

Commit

Permalink
fix: Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielrufino committed Aug 17, 2024
1 parent 98838e4 commit d1629fb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@ WORKDIR /opt/app
COPY package*.json ./
RUN npm ci
COPY . .
RUN cp .env.example .env \
NODE_ENV=production npm run build
RUN NODE_ENV=production npm run build
# Remove NODE_ENV above?

FROM node:20-alpine
RUN apk add --no-cache vips-dev=8.15.2-r1
ENV NODE_ENV=production

WORKDIR /opt/app
COPY --from=build /opt/app ./

ENV NODE_ENV=production
ENV HOST=0.0.0.0
ENV PORT=1337
ENV DATABASE_DRIVE=sqlite
ENV DATABASE_URL=.tmp/data.db

RUN chown -R node:node /opt/app
USER node
EXPOSE 1337
Expand Down

0 comments on commit d1629fb

Please sign in to comment.