From 7da89bb67da33429328bb50436ca78a561329572 Mon Sep 17 00:00:00 2001 From: Cristian Incarnato Date: Fri, 26 Jun 2020 18:26:44 -0300 Subject: [PATCH] Readme and Docker --- .dockerignore | 3 +++ Dockerfile | 14 +++++--------- apps/api/package.json | 4 ++-- apps/api/src/index.js | 6 +++++- apps/frontend/package-lock.json | 6 +++--- apps/frontend/package.json | 2 +- apps/frontend/src/assets/logo.png | Bin 6849 -> 11678 bytes apps/frontend/src/assets/logo.svg | 1 - docker-compose-development.yml | 14 ++++++++++++++ docker-compose-production.yml | 12 ++++++++++++ readme-docker.md | 18 ++++++++++++++++++ readme.md | 22 ++++++++++++++++++++++ 12 files changed, 85 insertions(+), 17 deletions(-) create mode 100644 .dockerignore delete mode 100644 apps/frontend/src/assets/logo.svg create mode 100644 docker-compose-development.yml create mode 100644 docker-compose-production.yml create mode 100644 readme-docker.md create mode 100644 readme.md diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..ff562d7 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +node_modules +*/node_modules +**/node_modules \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e3cd361..86ae595 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,23 +4,19 @@ RUN apk add bash RUN npm install pm2 -g -#API -COPY ./apps/api/ /app/api/ - -WORKDIR /app/api +COPY ./apps /apps +#API +WORKDIR /apps/api RUN npm install RUN npm run build #Frontend -COPY ./apps/frontend/ /app/frontend/ -WORKDIR /app/api/dist/frontend +WORKDIR /apps/frontend RUN npm install RUN npm run build - #Start -WORKDIR /app/api/dist -EXPOSE 80 +WORKDIR /apps/api/dist CMD ["pm2-runtime", "start", "index.js"] diff --git a/apps/api/package.json b/apps/api/package.json index 6ee7f2e..ba2b82d 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -4,7 +4,7 @@ "description": "", "main": "src/index.js", "scripts": { - "start": "BABEL_DISABLE_CACHE=1 babel-node src/index.js", + "start": "BABEL_DISABLE_CACHE=1 nodemon src/index.js --exec babel-node -e js", "init": "BABEL_DISABLE_CACHE=1 babel-node src/scripts/init.js", "build": "./node_modules/.bin/babel src -d dist --copy-files && ./node_modules/.bin/babel emails -d dist/emails --copy-files && cp .env dist/.env", "test": "jest" @@ -26,7 +26,7 @@ }, "homepage": "https://github.com/skeleton-metal/apollo-server-express#readme", "dependencies": { - "@ci-user-module/api": "^1.0.41", + "@ci-user-module/api": "^1.0.42", "@ci-custom-module/api": "^1.0.9", "apollo-server-express": "^2.12.0", "axios": "^0.19.2", diff --git a/apps/api/src/index.js b/apps/api/src/index.js index dc0f72a..0e846ec 100644 --- a/apps/api/src/index.js +++ b/apps/api/src/index.js @@ -3,7 +3,7 @@ import express from 'express'; import './mongo-db' import {ApolloServer, GraphQLExtension} from 'apollo-server-express' import {resolvers, typeDefs} from './modules-merge' - +import path from 'path' import {jwtMiddleware, corsMiddleware, rbacMiddleware, sessionMiddleware} from '@ci-user-module/api' import {expressRequestLogger, graphqlErrorLogger, graphqlResponseLogger} from './logger' @@ -52,6 +52,10 @@ app.use('/media/logo', express.static('media/logo')); app.use('/media/export', express.static('media/export')); app.use('/', express.static('web',{index: "index.html"})); +app.get('*', function (request, response) { + response.sendFile(path.resolve(__dirname, 'web/index.html')); +}); + //status app.get('/status', function(req,res){res.send("RUNNING")}) diff --git a/apps/frontend/package-lock.json b/apps/frontend/package-lock.json index 158033b..a1a1f1d 100644 --- a/apps/frontend/package-lock.json +++ b/apps/frontend/package-lock.json @@ -1054,9 +1054,9 @@ } }, "@ci-user-module/frontend": { - "version": "1.0.39", - "resolved": "https://registry.npmjs.org/@ci-user-module/frontend/-/frontend-1.0.39.tgz", - "integrity": "sha512-ZM+DGFs/xro7Ydp4cON3zQ2dGK6165jiP4l5BAeZoncTL+NAsYcZ22nNiF2+6KaGZKaCBCuYdZ8HPD6+2VyxSA==" + "version": "1.0.42", + "resolved": "https://registry.npmjs.org/@ci-user-module/frontend/-/frontend-1.0.42.tgz", + "integrity": "sha512-Q1JKG4Shi1HZ0NfeFaAfY16Z/BQDIIakbIyOfxfhzpQ/v6XigJdfwAv3e+0WUDaVEs1w39KRIldNpsKlzp460Q==" }, "@cnakazawa/watch": { "version": "1.0.4", diff --git a/apps/frontend/package.json b/apps/frontend/package.json index b367b50..eed712f 100644 --- a/apps/frontend/package.json +++ b/apps/frontend/package.json @@ -15,7 +15,7 @@ "apollo-upload-client": "^13.0.0", "chart.js": "^2.9.3", "chartjs-plugin-labels": "^1.1.0", - "@ci-user-module/frontend": "^1.0.39", + "@ci-user-module/frontend": "^1.0.42", "@ci-custom-module/frontend": "^1.0.6", "core-js": "^3.6.5", "graphql": "^15.0.0", diff --git a/apps/frontend/src/assets/logo.png b/apps/frontend/src/assets/logo.png index f3d2503fc2a44b5053b0837ebea6e87a2d339a43..bd93ff80bbb2365ec2eea2bff02b4ebfd414e9ae 100644 GIT binary patch literal 11678 zcmb_?bx<7L_U!-zVUPfWCAho02L>73gA?2d?mCdcU4pwy0tph_1_A^P!QFyG@Zj+H z?!E86_x}7bAjt+P*cb#?7JQR=EtYzz_%004lkATOf{0HA;X0Aw|ElxGCM zYwQ1f2ii!fNC5y}6EN@1P@m^W?wU{tpk|D0?>W}D)7JCQQ&ASNaDLBWX6bBh#o_bb z<)37Ln2*SF_}-4a*{y$Dm z?*A$4xj@c;o^Wz=aB==u`#DwYA5=um&CcrC`5%1=Zn1wc{~zo>K4P5znEzjk`FExN zLZ3^Oz!2m7@3u)`C?gp4pLY`EBCqcb01(mtb0H~c(w#hmyz0u@vdVU@|7`XDWNZcN zZ9VgGJv3Fd00pMqu%BEfxRO+Bi7sE%D@pH@001h0f{c{5&%$Bud{zk)uAG(;?$uTB zg2H$D#$f`a&m>|y)@7X5osLx37PJ8!{}b>3uUyr{S-V+JJ0maS`8u)_?Wsj%A|NL6 zxQvGbPa2R5E?B1{JdCVHo3f0P`nKm+cX4DJISm|%LT34h2Hz1W4?^9>DSsw^;<0KQ zO-$eb#3?v>Y3Gte<>Th-2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?biwNoq3WN1`&Wp8TvKj3C z3HR9ssH7a&Vr<6waJrU zdLg!ieYz%U^bmpn%;(V%%ugMk92&?_XX1K@mwnVSE6!&%P%Wdi7_h`CpScvspMx?N zQUR>oadnG17#hNc$pkTp+9lW+MBKHRZ~74XWUryd)4yd zj98$%XmIL4(9OnoeO5Fnyn&fpQ9b0h4e6EHHw*l68j;>(ya`g^S&y2{O8U>1*>4zR zq*WSI_2o$CHQ?x0!wl9bpx|Cm2+kFMR)oMud1%n2=qn5nE&t@Fgr#=Zv2?}wtEz^T z9rrj=?IH*qI5{G@Rn&}^Z{+TW}mQeb9=8b<_a`&Cm#n%n~ zU47MvCBsdXFB1+adOO)03+nczfWa#vwk#r{o{dF)QWya9v2nv43Zp3%Ps}($lA02*_g25t;|T{A5snSY?3A zrRQ~(Ygh_ebltHo1VCbJb*eOAr;4cnlXLvI>*$-#AVsGg6B1r7@;g^L zFlJ_th0vxO7;-opU@WAFe;<}?!2q?RBrFK5U{*ai@NLKZ^};Ul}beukveh?TQn;$%9=R+DX07m82gP$=}Uo_%&ngV`}Hyv8g{u z3SWzTGV|cwQuFIs7ZDOqO_fGf8Q`8MwL}eUp>q?4eqCmOTcwQuXtQckPy|4F1on8l zP*h>d+cH#XQf|+6c|S{7SF(Lg>bR~l(0uY?O{OEVlaxa5@e%T&xju=o1`=OD#qc16 zSvyH*my(dcp6~VqR;o(#@m44Lug@~_qw+HA=mS#Z^4reBy8iV?H~I;{LQWk3aKK8$bLRyt$g?-Artboard 46 diff --git a/docker-compose-development.yml b/docker-compose-development.yml new file mode 100644 index 0000000..6d7c8e9 --- /dev/null +++ b/docker-compose-development.yml @@ -0,0 +1,14 @@ +version: "3.5" + +services: + scaffold: + image: cincarnato/ci-scaffold + container_name: ci_scaffold + volumes: + - ./media:/apps/api/dist/media + - ./logs:/apps/api/dist/logs + - ./.env:/apps/api/dist/.env + ports: + - "80:5000" + networks: + - "host" diff --git a/docker-compose-production.yml b/docker-compose-production.yml new file mode 100644 index 0000000..91aa524 --- /dev/null +++ b/docker-compose-production.yml @@ -0,0 +1,12 @@ +version: "3.5" + +services: + scaffold: + image: cincarnato/ci-scaffold + container_name: ci_scaffold + volumes: + - ./media:/apps/api/dist/media + - ./logs:/apps/api/dist/logs + - ./.env:/apps/api/dist/.env + ports: + - "80:5000" diff --git a/readme-docker.md b/readme-docker.md new file mode 100644 index 0000000..7f073a5 --- /dev/null +++ b/readme-docker.md @@ -0,0 +1,18 @@ +## Build Image +* Reemplazar tagname por la version de la imagen (misma version que git) +`docker build -t cincarnato/scaffold:tagname .` + +## PUSH Image + +`docker push cincarnato/scaffold` + +## Docker deploy development with run + +`docker run -it --network="host" -p 8888:5000 cincarnato/scaffold` + +## Docker deploy with compose + +`docker-compose up -d` + +## Stack deploy +`docker stack deploy -c docker-compose.yml stackName` \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..a8b64ee --- /dev/null +++ b/readme.md @@ -0,0 +1,22 @@ +# SPA+GraphQL Scaffold +Base project with SPA frontend and API backend with Grahql + +- Monorepo: Frontend + API Graphql +- Docker ready +- Stateless + +## FRONTEND - SPA + +### Tecnolgies +- HTML, CSS, Javascript +- Vue, Vuex, Vuetify, VueI18n +- GraphqQL with Apollo Client +- JWT Auth + +## Backend - API + +### Tecnolgies +- Javascript / Node +- GraphqQL with Apollo Server +- Mongo with Mongoose +- JWT Auth \ No newline at end of file