All checks were successful
Build Docker Image Front / run (push) Successful in 24s
Build Docker Image Back / run (push) Successful in 21s
Build Docker Image Front / run (pull_request) Successful in 21s
Build Docker Image Back / run (pull_request) Successful in 21s
JsDocs / coverage (pull_request) Successful in 22s
Test and coverage / coverage (pull_request) Successful in 38s
Reviewed-on: #9 Co-authored-by: Clement <c.boesmier@aptatio.com> Co-committed-by: Clement <c.boesmier@aptatio.com>
35 lines
613 B
Plaintext
35 lines
613 B
Plaintext
#########
|
|
# Build #
|
|
#########
|
|
FROM docker.io/node:20-alpine as BUILD_IMAGE
|
|
|
|
# External deps (for node-gyp add: "python3 make g++")
|
|
RUN apk add --no-cache git
|
|
|
|
# run as non root user
|
|
USER node
|
|
|
|
# go to user repository
|
|
WORKDIR /home/node
|
|
|
|
# Add package json
|
|
ADD --chown=node:node package.json package-lock.json ./
|
|
|
|
# install dependencies from package lock
|
|
RUN npm ci
|
|
|
|
# Add project files
|
|
ADD --chown=node:node . .
|
|
|
|
# build
|
|
RUN npm run docs
|
|
|
|
# remove dev deps
|
|
RUN npm prune --omit=dev
|
|
|
|
##############
|
|
# Production #
|
|
##############
|
|
FROM httpd:alpine
|
|
|
|
COPY --from=BUILD_IMAGE /home/node/out/ /usr/local/apache2/htdocs/ |