mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Merge pull request #1516 from Human-Connection/remove_nodemon
Remove nodemon, use `nuxt` cli tools
This commit is contained in:
commit
04113a1d60
@ -15,10 +15,10 @@ COPY .env.template .env
|
|||||||
CMD ["yarn", "run", "start"]
|
CMD ["yarn", "run", "start"]
|
||||||
|
|
||||||
FROM base as builder
|
FROM base as builder
|
||||||
RUN yarn install --frozen-lockfile --non-interactive
|
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN cp .env.template .env
|
RUN cp .env.template .env
|
||||||
RUN yarn run build
|
RUN NODE_ENV=production yarn run build
|
||||||
|
|
||||||
# reduce image size with a multistage build
|
# reduce image size with a multistage build
|
||||||
FROM base as production
|
FROM base as production
|
||||||
|
|||||||
@ -15,7 +15,8 @@ services:
|
|||||||
- ./webapp:/nitro-web
|
- ./webapp:/nitro-web
|
||||||
- webapp_node_modules:/nitro-web/node_modules
|
- webapp_node_modules:/nitro-web/node_modules
|
||||||
command: yarn run dev
|
command: yarn run dev
|
||||||
user: root
|
environment:
|
||||||
|
- NUXT_BUILD=.nuxt-dist # avoid file ownership issues with shared folders
|
||||||
factories:
|
factories:
|
||||||
image: humanconnection/nitro-backend:builder
|
image: humanconnection/nitro-backend:builder
|
||||||
build:
|
build:
|
||||||
|
|||||||
@ -14,8 +14,6 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
#/nitro-web
|
#/nitro-web
|
||||||
- ./webapp/coverage:/nitro-web/coverage
|
- ./webapp/coverage:/nitro-web/coverage
|
||||||
environment:
|
|
||||||
- GRAPHQL_URI=http://backend:4000
|
|
||||||
backend:
|
backend:
|
||||||
image: humanconnection/nitro-backend:builder
|
image: humanconnection/nitro-backend:builder
|
||||||
build:
|
build:
|
||||||
|
|||||||
@ -12,7 +12,6 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- hc-network
|
- hc-network
|
||||||
environment:
|
environment:
|
||||||
- NUXT_BUILD=.nuxt-dist
|
|
||||||
- HOST=0.0.0.0
|
- HOST=0.0.0.0
|
||||||
- GRAPHQL_URI=http://backend:4000
|
- GRAPHQL_URI=http://backend:4000
|
||||||
- MAPBOX_TOKEN="pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.bZ8KK9l70omjXbEkkbHGsQ"
|
- MAPBOX_TOKEN="pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.bZ8KK9l70omjXbEkkbHGsQ"
|
||||||
|
|||||||
@ -19,7 +19,7 @@ COPY . .
|
|||||||
FROM base as build-and-test
|
FROM base as build-and-test
|
||||||
RUN cp .env.template .env
|
RUN cp .env.template .env
|
||||||
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||||
RUN yarn run build
|
RUN NODE_ENV=production yarn run build
|
||||||
|
|
||||||
FROM base as production
|
FROM base as production
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|||||||
@ -10,11 +10,11 @@
|
|||||||
"author": "Human Connection gGmbH",
|
"author": "Human Connection gGmbH",
|
||||||
"private": false,
|
"private": false,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server",
|
"dev": "nuxt",
|
||||||
"dev:styleguide": "cross-env STYLEGUIDE_DEV=true yarn dev",
|
"dev:styleguide": "cross-env STYLEGUIDE_DEV=true yarn run dev",
|
||||||
"storybook": "start-storybook -p 3002 -c storybook/",
|
"storybook": "start-storybook -p 3002 -c storybook/",
|
||||||
"build": "nuxt build",
|
"build": "nuxt build",
|
||||||
"start": "cross-env node server/index.js",
|
"start": "nuxt start",
|
||||||
"generate": "nuxt generate",
|
"generate": "nuxt generate",
|
||||||
"lint": "eslint --ext .js,.vue .",
|
"lint": "eslint --ext .js,.vue .",
|
||||||
"precommit": "yarn lint",
|
"precommit": "yarn lint",
|
||||||
@ -118,7 +118,6 @@
|
|||||||
"jest": "~24.9.0",
|
"jest": "~24.9.0",
|
||||||
"mutation-observer": "^1.0.3",
|
"mutation-observer": "^1.0.3",
|
||||||
"node-sass": "~4.12.0",
|
"node-sass": "~4.12.0",
|
||||||
"nodemon": "~1.19.2",
|
|
||||||
"prettier": "~1.18.2",
|
"prettier": "~1.18.2",
|
||||||
"sass-loader": "~8.0.0",
|
"sass-loader": "~8.0.0",
|
||||||
"style-loader": "~0.23.1",
|
"style-loader": "~0.23.1",
|
||||||
|
|||||||
@ -1,36 +0,0 @@
|
|||||||
const express = require('express')
|
|
||||||
const consola = require('consola')
|
|
||||||
const { Nuxt, Builder } = require('nuxt')
|
|
||||||
const app = express()
|
|
||||||
|
|
||||||
require('dotenv').config()
|
|
||||||
|
|
||||||
const host = process.env.HOST || '127.0.0.1'
|
|
||||||
const port = process.env.PORT || 3000
|
|
||||||
app.set('port', port)
|
|
||||||
|
|
||||||
// Import and Set Nuxt.js options
|
|
||||||
let config = require('../nuxt.config.js')
|
|
||||||
config.dev = !(process.env.NODE_ENV === 'production')
|
|
||||||
|
|
||||||
async function start() {
|
|
||||||
// Init Nuxt.js
|
|
||||||
const nuxt = new Nuxt(config)
|
|
||||||
|
|
||||||
// Build only in dev mode
|
|
||||||
if (config.dev) {
|
|
||||||
const builder = new Builder(nuxt)
|
|
||||||
await builder.build()
|
|
||||||
}
|
|
||||||
|
|
||||||
// Give nuxt middleware to express
|
|
||||||
app.use(nuxt.render)
|
|
||||||
|
|
||||||
// Listen the server
|
|
||||||
app.listen(port, host)
|
|
||||||
consola.ready({
|
|
||||||
message: `Server listening on http://${host}:${port}`,
|
|
||||||
badge: true,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
start()
|
|
||||||
@ -10558,7 +10558,7 @@ node-sass@^4.12.0, node-sass@~4.12.0:
|
|||||||
stdout-stream "^1.4.0"
|
stdout-stream "^1.4.0"
|
||||||
"true-case-path" "^1.0.2"
|
"true-case-path" "^1.0.2"
|
||||||
|
|
||||||
nodemon@^1.19.1, nodemon@~1.19.2:
|
nodemon@^1.19.1:
|
||||||
version "1.19.2"
|
version "1.19.2"
|
||||||
resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.19.2.tgz#b0975147dc99b3761ceb595b3f9277084931dcc0"
|
resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.19.2.tgz#b0975147dc99b3761ceb595b3f9277084931dcc0"
|
||||||
integrity sha512-hRLYaw5Ihyw9zK7NF+9EUzVyS6Cvgc14yh8CAYr38tPxJa6UrOxwAQ351GwrgoanHCF0FalQFn6w5eoX/LGdJw==
|
integrity sha512-hRLYaw5Ihyw9zK7NF+9EUzVyS6Cvgc14yh8CAYr38tPxJa6UrOxwAQ351GwrgoanHCF0FalQFn6w5eoX/LGdJw==
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user