Browse Source

Refactor Dockerfile

pull/4762/head
Dennis Walker 3 months ago
parent
commit
a9b235c038
  1. 4
      Dockerfile
  2. 2
      package.json

4
Dockerfile

@ -33,8 +33,8 @@ COPY ./nx.json nx.json
COPY ./replace.build.mjs replace.build.mjs COPY ./replace.build.mjs replace.build.mjs
COPY ./tsconfig.base.json tsconfig.base.json COPY ./tsconfig.base.json tsconfig.base.json
# Update build command for Nx 21 # Use build:production script from package.json (with Nx 21 syntax)
RUN npx nx run-many --target=build --projects=api,client --configuration=production RUN npm run build:production
# Prepare the dist image with additional node_modules # Prepare the dist image with additional node_modules
WORKDIR /ghostfolio/dist/apps/api WORKDIR /ghostfolio/dist/apps/api

2
package.json

@ -15,7 +15,7 @@
"affected:test": "nx affected:test", "affected:test": "nx affected:test",
"analyze:client": "nx run client:build:production --stats-json && webpack-bundle-analyzer -p 1234 dist/apps/client/en/stats.json", "analyze:client": "nx run client:build:production --stats-json && webpack-bundle-analyzer -p 1234 dist/apps/client/en/stats.json",
"angular": "node --max_old_space_size=32768 ./node_modules/@angular/cli/bin/ng", "angular": "node --max_old_space_size=32768 ./node_modules/@angular/cli/bin/ng",
"build:production": "nx run api:copy-assets && nx run api:build:production && nx run client:copy-assets && nx run client:build:production && nx run ui:build-storybook && npm run replace-placeholders-in-build", "build:production": "npx nx run-many --target=copy-assets --projects=api,client && npx nx run-many --target=build --projects=api,client --configuration=production && npx nx run ui:build-storybook && npm run replace-placeholders-in-build",
"build:storybook": "nx run ui:build-storybook", "build:storybook": "nx run ui:build-storybook",
"database:format-schema": "prisma format", "database:format-schema": "prisma format",
"database:generate-typings": "prisma generate", "database:generate-typings": "prisma generate",

Loading…
Cancel
Save