Fix Docker build by inlining WebSocket hook and copying full source
deploy to danak / build_and_deploy (push) Has been cancelled
deploy to danak / build_and_deploy (push) Has been cancelled
This commit is contained in:
@@ -28,3 +28,6 @@ coverage
|
||||
*.swp
|
||||
|
||||
yarn.lock
|
||||
|
||||
*.archive
|
||||
bargrest_bargtest.archive
|
||||
|
||||
+1
-3
@@ -34,8 +34,7 @@ WORKDIR /build
|
||||
|
||||
RUN apk add --no-cache python3 make g++
|
||||
|
||||
COPY package.json package-lock.json nuxt.config.js ./
|
||||
COPY assets components layouts middleware mixins modules pages plugins server static store ./
|
||||
COPY . .
|
||||
|
||||
COPY --from=deps /deps/node_modules ./node_modules
|
||||
|
||||
@@ -57,7 +56,6 @@ COPY --from=prod-deps --chown=appuser:appgroup /deps/node_modules ./node_modules
|
||||
COPY --from=builder --chown=appuser:appgroup /build/.nuxt ./.nuxt
|
||||
COPY --from=builder --chown=appuser:appgroup /build/static ./static
|
||||
COPY --from=builder --chown=appuser:appgroup /build/server ./server
|
||||
COPY --from=builder --chown=appuser:appgroup /build/modules ./modules
|
||||
COPY --from=builder --chown=appuser:appgroup /build/nuxt.config.js /build/package.json ./
|
||||
|
||||
USER appuser
|
||||
|
||||
+7
-1
@@ -2,6 +2,7 @@ const webpack = require("webpack");
|
||||
// const serverPort = 9964 || process.env.PORT
|
||||
const serverPort = 8959 || process.env.PORT;
|
||||
const fs = require("fs");
|
||||
const wss = require("./server/socket/init");
|
||||
|
||||
export default {
|
||||
// Global page headers: https://go.nuxtjs.dev/config-head
|
||||
@@ -60,9 +61,14 @@ export default {
|
||||
"@nuxtjs/axios",
|
||||
"@nuxtjs/auth-next",
|
||||
"@nuxtjs/firebase",
|
||||
"~/modules/WebSocketServer.js",
|
||||
],
|
||||
|
||||
hooks: {
|
||||
listen(server) {
|
||||
wss(server);
|
||||
},
|
||||
},
|
||||
|
||||
firebase: {
|
||||
// For Firebase JS SDK v7.20.0 and later, measurementId is optional
|
||||
config: {
|
||||
|
||||
Reference in New Issue
Block a user