Browse Source

fix Dockerfile & add a builder element to it

master
Trent Larson 4 months ago
parent
commit
8750c78897
  1. 2
      CHANGELOG.md
  2. 8
      Dockerfile

2
CHANGELOG.md

@ -19,7 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed ### Fixed
- Incorrect check for others who recorded same image - Incorrect check for others who recorded same image
### Changed in DB or environment ### Changed in DB or environment
- Nothing - New SQL migration (for the new file deletion feature)
## [1.0.0] ## [1.0.0]

8
Dockerfile

@ -1,14 +1,18 @@
# syntax=docker/dockerfile:1 # syntax=docker/dockerfile:1
FROM node:22-alpine FROM node:22-alpine AS builder
ARG IMAGE_API_VERSION ARG IMAGE_API_VERSION
RUN npm install -g pnpm RUN npm install -g pnpm
RUN apk add git RUN apk add git
RUN git clone https://gitea.anomalistdesign.com/log-trade/image-api.git RUN git clone https://gitea.anomalistdesign.com/log-trade/image-api.git
WORKDIR image-api WORKDIR image-api
RUN git checkout $IMAGE_API_VERSION RUN git checkout $IMAGE_API_VERSION
RUN pnpm install RUN pnpm install
RUN pnpm build RUN pnpm build
RUN pnpm install --prod
FROM node:22-alpine
COPY --from=builder /image-api/dist /image-api/dist
COPY --from=builder /image-api/node_modules /image-api/node_modules
WORKDIR image-api
CMD node dist/server.js CMD node dist/server.js
Loading…
Cancel
Save