Use NODE_ENV when building on frontend container.

This commit is contained in:
Buster "Silver Eagle" Neece 2021-10-01 19:54:51 -05:00
parent 6b8170324b
commit eccb96dc54
No known key found for this signature in database
GPG Key ID: 6D9E12FF03411F4E
3 changed files with 5 additions and 3 deletions

View File

@ -39,9 +39,9 @@ bash:
frontend-bash:
docker-compose -f frontend/docker-compose.yml build
docker-compose --env-file=.env -f frontend/docker-compose.yml run --rm frontend
docker-compose --env-file=.env -f frontend/docker-compose.yml run -e NODE_ENV=development --rm frontend
frontend-build:
docker-compose -f frontend/docker-compose.yml build
docker-compose --env-file=.env -f frontend/docker-compose.yml run --rm frontend npm run dev-build
docker-compose --env-file=.env -f frontend/docker-compose.yml run -e NODE_ENV=development --rm frontend npm run dev-build

View File

@ -24,6 +24,8 @@ USER node:node
VOLUME /data/frontend/node_modules
ENV NODE_ENV=production
# Define default command.
ENTRYPOINT ["fixuid"]
CMD ["npm", "run", "dev"]

View File

@ -4,7 +4,7 @@ const { VueLoaderPlugin } = require('vue-loader');
const path = require('path');
module.exports = {
mode: 'production',
mode: (process.env.NODE_ENV === 'production') ? 'production' : 'development',
entry: {
Dashboard: '~/pages/Dashboard.js',
AdminAuditLog: '~/pages/Admin/AuditLog.js',