feat/init-jsdocs #9

Merged
Clement merged 4 commits from feat/init-jsdocs into feat--init-express-backend 2024-05-05 12:46:45 +00:00
3 changed files with 34 additions and 11 deletions
Showing only changes of commit aa8d2316c6 - Show all commits

View File

@ -10,14 +10,6 @@ jobs:
- name: Checkout # rapatrie le depot
uses: actions/checkout@v3
- name: Build
uses: andstor/jsdoc-action@v1
with:
source_dir: ./Express/barAndCafe/src
recurse: true
output_dir: ./Express/barAndCafe/out
config_file: ./Express/barAndCafe/jsdoc.json
template: better-docs
- name: Docker meta
id: meta

View File

@ -1,5 +1,3 @@
# This Dockerfile allows you to run AstroJS in server mode
#########
# Build #
#########

View File

@ -1,2 +1,35 @@
#########
# 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 ./out/ /usr/local/apache2/htdocs/
COPY --from=BUILD_IMAGE /home/node/out/ /usr/local/apache2/htdocs/