Better docker image and docs

This commit is contained in:
Pablo Ferreiro
2024-01-25 17:10:55 +01:00
parent b7c46979f1
commit 895e33d66c
4 changed files with 205 additions and 269 deletions

View File

@@ -1,12 +1,23 @@
FROM node:18-alpine
FROM node:20-alpine
WORKDIR /usr/src/app
# Setup Alpine for building "canvas" package
RUN apk add --no-cache python3 make g++ pkgconfig cairo-dev pango-dev
# Setup Alpine for canvas
RUN apk add --no-cache \
# Build only
python3 g++ make cairo-dev pango-dev \
# Runtime
cairo pango
# Install deps
COPY package.json yarn.lock ./
RUN yarn install
COPY . .
# Copy required files for server
COPY ./src ./src
COPY ./api ./api
COPY ./js ./js
RUN apk del python3 g++ make cairo-dev pango-dev
EXPOSE 8080
CMD [ "node", "api/index.js" ]