Better docker image and docs
This commit is contained in:
19
Dockerfile
19
Dockerfile
@@ -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" ]
|
||||
|
||||
Reference in New Issue
Block a user