diff --git a/extension.js b/extension.js index 0ffe27c..24182ae 100644 --- a/extension.js +++ b/extension.js @@ -14,7 +14,7 @@ import shellQuote from 'shell-quote'; * @property {boolean=} dev - Enable dev mode. Defaults to `false`. * @property {string=} installCommand - A custom install command. Defaults to `npm install`. * @property {number=} port - A port for the Next.js server. Defaults to the HarperDB HTTP Port. - * @property {number=} securePort - A (secure) port for the https Next.js server. Defaults to the HarperDB HTTPS Secure Port. + * @property {number=} securePort - A (secure) port for the https Next.js server. Defaults to the HarperDB HTTP Secure Port. * @property {boolean=} prebuilt - Instruct the extension to skip executing the `buildCommand`. Defaults to `false`. * @property {string=} subPath - A sub path for serving request from. Defaults to `''`. */ @@ -77,8 +77,8 @@ function resolveConfig(options) { buildOnly: options.buildOnly ?? false, dev: options.dev ?? false, installCommand: options.installCommand ?? 'npm install', - port: options.port, - securePort: options.securePort, + port: options.port ?? options.server.config.http.port, + securePort: options.securePort ?? options.server.config.http.securePort, prebuilt: options.prebuilt ?? false, subPath: options.subPath ?? '', cache: options.cache ?? false, diff --git a/util/docker/base.dockerfile b/util/docker/base.dockerfile index 86e5742..3a3e159 100644 --- a/util/docker/base.dockerfile +++ b/util/docker/base.dockerfile @@ -37,8 +37,9 @@ ARG CACHE_BUST RUN echo "${CACHE_BUST}" COPY config.yaml extension.js cli.js package.json /@harperdb/nextjs/ +WORKDIR /@harperdb/nextjs # Install dependencies for the @harperdb/nextjs module -RUN npm install -C /@harperdb/nextjs +RUN npm install # Create link to the @harperdb/nextjs module -RUN npm link -C /@harperdb/nextjs +RUN npm link diff --git a/util/docker/next.dockerfile b/util/docker/next.dockerfile index a5845d7..00b192b 100644 --- a/util/docker/next.dockerfile +++ b/util/docker/next.dockerfile @@ -11,7 +11,8 @@ ARG CACHE_BUST RUN echo "${CACHE_BUST}" COPY fixtures/next-${NEXT_MAJOR} /hdb/components/next-${NEXT_MAJOR} -RUN cd hdb/components/next-${NEXT_MAJOR} && npm install +WORKDIR /hdb/components/next-${NEXT_MAJOR} +RUN npm install EXPOSE 9925 9926