Use NODE_ENV when building on frontend container.
This commit is contained in:
parent
6b8170324b
commit
eccb96dc54
4
Makefile
4
Makefile
|
@ -39,9 +39,9 @@ bash:
|
||||||
|
|
||||||
frontend-bash:
|
frontend-bash:
|
||||||
docker-compose -f frontend/docker-compose.yml build
|
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:
|
frontend-build:
|
||||||
docker-compose -f frontend/docker-compose.yml 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
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,8 @@ USER node:node
|
||||||
|
|
||||||
VOLUME /data/frontend/node_modules
|
VOLUME /data/frontend/node_modules
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
# Define default command.
|
# Define default command.
|
||||||
ENTRYPOINT ["fixuid"]
|
ENTRYPOINT ["fixuid"]
|
||||||
CMD ["npm", "run", "dev"]
|
CMD ["npm", "run", "dev"]
|
||||||
|
|
|
@ -4,7 +4,7 @@ const { VueLoaderPlugin } = require('vue-loader');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
mode: 'production',
|
mode: (process.env.NODE_ENV === 'production') ? 'production' : 'development',
|
||||||
entry: {
|
entry: {
|
||||||
Dashboard: '~/pages/Dashboard.js',
|
Dashboard: '~/pages/Dashboard.js',
|
||||||
AdminAuditLog: '~/pages/Admin/AuditLog.js',
|
AdminAuditLog: '~/pages/Admin/AuditLog.js',
|
||||||
|
|
Loading…
Reference in New Issue