Skip to content

Commit

Permalink
🚑 Fix copy after build.
Browse files Browse the repository at this point in the history
Why? Changes to the tsconfig file resulted in the /dist/src file flattening to just /dist.

See 449e711#diff-f2dc42e236f2185fd4a4e9738381cc49ce9a1a285aa1b9f65c258f86b0ecb547
  • Loading branch information
klondikemarlen committed Jun 6, 2024
1 parent af5e7d1 commit 853d92f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ COPY api ./
RUN npm run build

# copy non JS files required in production
COPY ./api/src/db/data/*.json ./dist/src/db/data/
COPY ./api/src/db/data/*.json ./dist/db/data/

# State 2 - web build - requires development environment because typescript
FROM base-node as web-build-stage
Expand Down Expand Up @@ -60,7 +60,7 @@ RUN chown -R node:node /home/node/app
COPY --from=api-build-stage --chown=node:node /usr/src/api/package*.json ./
RUN npm install && npm cache clean --force --loglevel=error

COPY --from=api-build-stage --chown=node:node /usr/src/api/dist/src ./dist
COPY --from=api-build-stage --chown=node:node /usr/src/api/dist ./dist
COPY --from=web-build-stage --chown=node:node /usr/src/web/dist ./dist/web

RUN echo "RELEASE_TAG=${RELEASE_TAG}" >> VERSION
Expand Down
2 changes: 1 addition & 1 deletion api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
"baseUrl": "." /* Base directory to resolve non-absolute module names. */,
"paths": {
"@/*": ["./src/*", "./dist/src/*"]
"@/*": ["./src/*", "./dist/*"]
},
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
/* List of folders to include type definitions from. */
Expand Down

0 comments on commit 853d92f

Please sign in to comment.