Commit 928d5474 by 한태현

[build] nodejs dockerbuild, crossenv build 환경 구축

parent b91ed10c
#!/bin/bash
#echo -e "neuro-home-frontend select"
#echo "neuro-home-frontend" > .select-home-frontend-target
#
#target=$(cat .select-home-frontend-target)
rm -rf ../apps/frontend
cp -av ../frontend ../apps
cp -av ../frontend/package*.json ./
rm -rf ../apps/frontend/node_modules
docker-compose run --name neuro-home-frontend-build \
--rm \
--workdir /apps/frontend/ \
base-home-main-ds \
bash -c "npm install && npm run crossbuild "
\ No newline at end of file
......@@ -39,10 +39,18 @@ rm -rf /var/lib/apt/lists/*
# https://github.com/SeleniumHQ/docker-selenium/issues/87
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get update
RUN apt-get install -y nodejs build-essential
# Add zip utility - it comes in very handy
RUN apt-get update && apt-get install -y zip
RUN npm install -g npm@8.0.0
RUN npm install -g vue
#RUN npm i vue-cli-service
RUN yarn global add @vue/cli
# versions of local tools
......@@ -53,6 +61,8 @@ RUN vue --version
RUN google-chrome --version
RUN zip --version
RUN git --version
RUN chown -R nobody:nogroup "/root/.npm"
RUN npm i -g cross-env
# good colors for most applications
ENV TERM xterm
......@@ -62,4 +72,5 @@ ENV npm_config_loglevel warn
ENV npm_config_unsafe_perm true
WORKDIR /apps
#COPY package*.json ./
CMD bash
FROM node:14.18.1
MAINTAINER David You <frog@falinux.com>
ENV DEBIAN_FRONTEND noninteractive
USER root
# Set default locale for the environment
ENV LC_ALL C.UTF-8
ENV LANG ko_KR.UTF-8
ENV LANGUAGE ko_KR.UTF-8
RUN apt-get update && apt-get install -y apt-utils
RUN apt-get update && \
apt-get install -y \
libgtk2.0-0 \
libnotify-dev \
libgconf-2-4 \
libnss3 \
libxss1 \
libasound2 \
xvfb
RUN apt-get update && apt-get install -y fonts-nanum
RUN echo "force new chrome here"
# install Chromebrowser
RUN \
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list && \
apt-get update && \
apt-get install -y dbus-x11 google-chrome-stable && \
rm -rf /var/lib/apt/lists/*
# "fake" dbus address to prevent errors
# https://github.com/SeleniumHQ/docker-selenium/issues/87
ENV DBUS_SESSION_BUS_ADDRESS=/dev/null
# Add zip utility - it comes in very handy
RUN apt-get update && apt-get install -y zip
RUN npm install -g npm@8.0.0
RUN npm install -g vue
RUN yarn global add @vue/cli
# versions of local tools
RUN node -v
RUN npm -v
RUN yarn -v
RUN vue --version
RUN google-chrome --version
RUN zip --version
RUN git --version
RUN chown -R nobody:nogroup "/root/.npm"
# good colors for most applications
ENV TERM xterm
# avoid million NPM install messages
ENV npm_config_loglevel warn
# allow installing when the main user is root
ENV npm_config_unsafe_perm true
WORKDIR /apps
#COPY package*.json ./
CMD bash
......@@ -6,8 +6,12 @@
rm -rf ../apps/frontend
cp -av ../frontend ../apps
rm -rf ../apps/frontend/node_modules
docker-compose run --name neuro-home-frontend-init \
--rm \
--workdir /apps/frontend/ \
base-home-main-ds \
npm install
bash -c "npm install && chown nobody.nogroup ~/.npm "
#!/bin/bash
#echo -e "neuro-home-frontend select"
#echo "neuro-home-frontend" > .select-home-frontend-target
#
#target=$(cat .select-home-frontend-target)
rm -rf ../apps/frontend
cp -av ../frontend ../apps
rm -rf ../apps/frontend/node_modules
docker-compose run --name neuro-home-frontend-init \
--rm \
--workdir /apps/frontend/ \
base-home-main-ds \
bash -c "npm install && chown nobody.nogroup ~/.npm "
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "frontend",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint",
"start": "npm run serve",
"build2": "npm run build",
"crossbuild": "cross-env vue-cli-service build",
"crossbuild2": "cross-env npm run build"
},
"dependencies": {
"apollo-boost": "^0.4.9",
"chart.js": "^2.9.4",
"core-js": "^3.6.5",
"graphql": "^15.5.1",
"konva": "^7.1.3",
"register-service-worker": "^1.7.1",
"vue": "^2.6.11",
"vue-apollo": "^3.0.7",
"vue-chartjs": "^3.5.1",
"vue-konva": "^2.1.6",
"vue-router": "^3.2.0",
"vuetify": "^2.2.11",
"vuex": "^3.4.0",
"vuex-persistedstate": "^4.1.0"
},
"devDependencies": {
"@mdi/js": "^5.5.55",
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-e2e-nightwatch": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-pwa": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-unit-jest": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/test-utils": "^1.0.3",
"graphql-tag": "^2.9.0",
"babel-eslint": "^10.1.0",
"chromedriver": "85",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"sass": "^1.26.5",
"sass-loader": "^8.0.2",
"vue-cli-plugin-apollo": "^0.20.0",
"vue-cli-plugin-vuetify": "~2.0.7",
"vue-template-compiler": "^2.6.11",
"vuetify-loader": "^1.3.0"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {},
"overrides": [
{
"files": [
"**/__tests__/*.{j,t}s?(x)",
"**/tests/unit/**/*.spec.{j,t}s?(x)"
],
"env": {
"jest": true
}
}
]
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
],
"jest": {
"preset": "@vue/cli-plugin-unit-jest"
}
}
#!/bin/bash
scp -r ../apps/backend firefly@192.168.52.137:~
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment