diff --git a/.dockerignore b/.dockerignore index dbe86c7e..3a77d852 100644 --- a/.dockerignore +++ b/.dockerignore @@ -4,3 +4,4 @@ .npm dist node_modules +.git \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 17d96c62..671922a0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,10 +8,14 @@ ARG CI=true RUN mkdir /app WORKDIR /app -COPY . .* ./ - +# Install dependencies before copying the full source code to take advantage of Docker layer caching +COPY package*.json ./ +# Needed for postinstall (build:models) during npm ci +COPY src/build-spec.ts ./src/build-spec.ts +COPY src/openapi ./src/openapi RUN npm ci +COPY . .* ./ RUN npm run build RUN npm run lint RUN npm run test diff --git a/README.md b/README.md index 59c92fbc..9b4370e2 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,10 @@ npm run build:spec # Build OpenAPI specification | `src/openapi/` | OpenAPI specifications | | `src/middleware/` | JWT, session, authz middleware | +### Operational Docs + +- [Docs](docs/) + ## Authentication & Authorization ### Authentication