Closed cannap closed 5 years ago
I'll take a look soon
I have no errors running the same uvue version. Here is my config
version: '3'
volumes:
app-dist: {}
services:
app:
build: .
ports:
- '8000:8000'
volumes:
- app-dist:/home/node/exomia-cloud/dist
- ./config/:/home/node/exomia-cloud/config/:ro
nginx:
image: nginx:1.15-alpine
ports:
- '80:80'
volumes:
- ./nginx:/etc/nginx/conf.d
- app-dist:/var/www/html
FROM node:10 as builder
ENV NODE_ENV production
RUN mkdir -p /home/node/exomia-cloud
WORKDIR /home/node/exomia-cloud
COPY package.json /home/node/exomia-cloud
RUN npm run install:prod
COPY . /home/node/exomia-cloud
RUN npm run build && \
rm -rf /home/node/exomia-cloud/public
FROM node:10-alpine
ENV NODE_ENV production
ENV HOST 0.0.0.0
ENV PORT 8000
COPY --from=builder /home/node/exomia-cloud /home/node/exomia-cloud
RUN chown -R node:node /home/node/exomia-cloud
USER node
WORKDIR /home/node/exomia-cloud
CMD ["./node_modules/@uvue/server/start.js"]
maybe need a reproduction repository? Or did you fixed it by now?
i have no idea i use the ExpressAdapter its always hits the catch block https://github.com/universal-vue/uvue/blob/master/packages/%40uvue/server/start.js#L100
my server.config
import { ExpressAdapter } from '@uvue/server'
let plugins = [
'@uvue/server/plugins/gzip',
'@uvue/server/plugins/serverError',
'@uvue/server/plugins/static',
'@uvue/server/plugins/modernBuild',
'./src/server/plugin.js'
]
export default {
adapter: ExpressAdapter,
plugins,
watch: [
'server.config.js',
'src/server/**/*.js',
'.env',
'.env.development.local'
]
}
my server plugin
import bodyParser from 'body-parser'
import routes from './apiRoutes'
import { connect } from './database/connect'
import morgan from 'morgan'
import { setup, webhookListener } from './services/mailchimp'
const mailchimpListenerPath = process.env.MAILCHIMP_LISTENER_URL
export default {
install (server) {
const io = require('socket.io')(process.env.SOCKET_PORT)
setup()
const app = server.getApp()
connect()
app.use(function (req, res, next) {
req.io = io
next()
})
app.use(morgan('dev'))
app.use(bodyParser.urlencoded({ extended: true }))
app.use(bodyParser.json())
app.post('/' + mailchimpListenerPath, webhookListener)
app.use('/api/v1', routes)
}
}
Sorry for late answer, i've tested it too and do not encounter your issue actually.
Can you make a simple repro repository ?
Closing, no activity
Describe the bug A clear and concise description of what the bug is.
To Reproduce docker-compose build docker-compose up -d and this is in my logs
Expected behavior Server running?
Additional context
Please indicate versions of:
thanks it looks like it hits the catch block and then server is just not defined but i cant tell why its hitting the catch block