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"]
|
||||
|
||||
FROM base as builder
|
||||
RUN yarn install --frozen-lockfile --non-interactive
|
||||
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||
COPY . .
|
||||
RUN cp .env.template .env
|
||||
RUN yarn run build
|
||||
RUN NODE_ENV=production yarn run build
|
||||
|
||||
# reduce image size with a multistage build
|
||||
FROM base as production
|
||||
|
||||
@ -15,7 +15,8 @@ services:
|
||||
- ./webapp:/nitro-web
|
||||
- webapp_node_modules:/nitro-web/node_modules
|
||||
command: yarn run dev
|
||||
user: root
|
||||
environment:
|
||||
- NUXT_BUILD=.nuxt-dist # avoid file ownership issues with shared folders
|
||||
factories:
|
||||
image: humanconnection/nitro-backend:builder
|
||||
build:
|
||||
|
||||
@ -14,8 +14,6 @@ services:
|
||||
volumes:
|
||||
#/nitro-web
|
||||
- ./webapp/coverage:/nitro-web/coverage
|
||||
environment:
|
||||
- GRAPHQL_URI=http://backend:4000
|
||||
backend:
|
||||
image: humanconnection/nitro-backend:builder
|
||||
build:
|
||||
|
||||
@ -12,7 +12,6 @@ services:
|
||||
networks:
|
||||
- hc-network
|
||||
environment:
|
||||
- NUXT_BUILD=.nuxt-dist
|
||||
- HOST=0.0.0.0
|
||||
- GRAPHQL_URI=http://backend:4000
|
||||
- MAPBOX_TOKEN="pk.eyJ1IjoiaHVtYW4tY29ubmVjdGlvbiIsImEiOiJjajl0cnBubGoweTVlM3VwZ2lzNTNud3ZtIn0.bZ8KK9l70omjXbEkkbHGsQ"
|
||||
|
||||
@ -19,7 +19,7 @@ COPY . .
|
||||
FROM base as build-and-test
|
||||
RUN cp .env.template .env
|
||||
RUN yarn install --production=false --frozen-lockfile --non-interactive
|
||||
RUN yarn run build
|
||||
RUN NODE_ENV=production yarn run build
|
||||
|
||||
FROM base as production
|
||||
ENV NODE_ENV=production
|
||||
|
||||
@ -10,11 +10,11 @@
|
||||
"author": "Human Connection gGmbH",
|
||||
"private": false,
|
||||
"scripts": {
|
||||
"dev": "cross-env NODE_ENV=development nodemon server/index.js --watch server",
|
||||
"dev:styleguide": "cross-env STYLEGUIDE_DEV=true yarn dev",
|
||||
"dev": "nuxt",
|
||||
"dev:styleguide": "cross-env STYLEGUIDE_DEV=true yarn run dev",
|
||||
"storybook": "start-storybook -p 3002 -c storybook/",
|
||||
"build": "nuxt build",
|
||||
"start": "cross-env node server/index.js",
|
||||
"start": "nuxt start",
|
||||
"generate": "nuxt generate",
|
||||
"lint": "eslint --ext .js,.vue .",
|
||||
"precommit": "yarn lint",
|
||||
@ -118,7 +118,6 @@
|
||||
"jest": "~24.9.0",
|
||||
"mutation-observer": "^1.0.3",
|
||||
"node-sass": "~4.12.0",
|
||||
"nodemon": "~1.19.2",
|
||||
"prettier": "~1.18.2",
|
||||
"sass-loader": "~8.0.0",
|
||||
"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"
|
||||
"true-case-path" "^1.0.2"
|
||||
|
||||
nodemon@^1.19.1, nodemon@~1.19.2:
|
||||
nodemon@^1.19.1:
|
||||
version "1.19.2"
|
||||
resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.19.2.tgz#b0975147dc99b3761ceb595b3f9277084931dcc0"
|
||||
integrity sha512-hRLYaw5Ihyw9zK7NF+9EUzVyS6Cvgc14yh8CAYr38tPxJa6UrOxwAQ351GwrgoanHCF0FalQFn6w5eoX/LGdJw==
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user