diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..de625beb --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..d4b7e196 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Utilize the Node.js 18 official image +FROM node:18-alpine + +# Set the working directory inside the container +WORKDIR /app + +# Copy the rest of the application code +COPY . . + +# Install the dependencies +RUN yarn install --frozen-lockfile + +# Build the Fastboot app +RUN yarn build + +# Expose the port the Fastboot app runs on +EXPOSE 5000 + +# Command to run the fastboot server after app gets build +CMD ["node", "fastboot-server"] diff --git a/app/constants/urls.js b/app/constants/urls.js index b65938f2..de1f4514 100644 --- a/app/constants/urls.js +++ b/app/constants/urls.js @@ -28,7 +28,6 @@ const APP_URLS = { IDENTITY: `${SCHEME}staging-my.${DOMAIN}/identity`, MY_STATUS: `${SCHEME}staging-my.${DOMAIN}`, API_BACKEND: `${SCHEME}staging-api.${DOMAIN}`, - DASHBOARD: `${SCHEME}staging-dashboard.${DOMAIN}`, }, development: { HOME: `${SCHEME}staging-www.${DOMAIN}`, diff --git a/fastboot-server.js b/fastboot-server.js index b0b8fe3c..c2077ba3 100644 --- a/fastboot-server.js +++ b/fastboot-server.js @@ -1,5 +1,5 @@ -import FastBootAppServer from 'fastboot-app-server'; - +// eslint-disable-next-line no-undef +const FastBootAppServer = require('fastboot-app-server'); const MY_GLOBAL = 'MY GLOBAL'; let server = new FastBootAppServer({ @@ -9,6 +9,7 @@ let server = new FastBootAppServer({ // Optional - Make values available to the Ember app running in the FastBoot server, e.g. "MY_GLOBAL" will be available as "GLOBAL_VALUE" return Object.assign({}, defaultGlobals, { GLOBAL_VALUE: MY_GLOBAL }); }, + port: 5000, log: true, // Optional - Specifies whether the server should use its default request logging. Useful for turning off default logging when providing custom logging middlewares chunkedResponse: true, // Optional - Opt-in to chunked transfer encoding, transferring the head, body and potential shoeboxes in separate chunks. Chunked transfer encoding should have a positive effect in particular when the app transfers a lot of data in the shoebox. }); diff --git a/package.json b/package.json index 88b71842..c7a76131 100644 --- a/package.json +++ b/package.json @@ -33,10 +33,10 @@ "d3-cloud": "1.2.7", "dotenv": "16.0.2", "ember-d3": "0.5.1", - "exists-sync": "0.1.0", - "fastboot-app-server": "3.3.2" + "exists-sync": "0.1.0" }, "devDependencies": { + "fastboot-app-server": "4.1.4", "@babel/core": "7.24.7", "@babel/eslint-parser": "7.24.7", "@babel/plugin-proposal-decorators": "7.24.7", diff --git a/yarn.lock b/yarn.lock index a0e258c2..ee222f2c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10071,25 +10071,17 @@ fast-sourcemap-concat@^2.1.0: source-map-url "^0.3.0" sourcemap-validator "^1.1.0" -fastboot-app-server@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/fastboot-app-server/-/fastboot-app-server-3.3.2.tgz#7aadc5bfdda7b51a20005c26404959c1d80d098b" - integrity sha512-jQ+nsmcLhR49Bx1J/74eN/9yez5abzutnck91FdctWgwHMghuuas82v5hoqrKYSVq8I1J5RwS0v7WcICNLH1oA== +fastboot-app-server@4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/fastboot-app-server/-/fastboot-app-server-4.1.4.tgz#f3f1353cda694f9ce9fb4b3d498bea1ef81eb789" + integrity sha512-1XEP0vnZ8GPqWqo7YNMzfNRtH+x/l2OcRpPjuP/07vL8qozHxakb79DU2lcnDqOAmqz5aCYAHCXRrYF7SLCw0g== dependencies: basic-auth "^2.0.1" chalk "^4.1.2" compression "^1.7.4" express "^4.17.2" - fastboot "3.3.2" - fastboot-express-middleware "3.3.2" - -fastboot-express-middleware@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/fastboot-express-middleware/-/fastboot-express-middleware-3.3.2.tgz#6d78de06f1db51f47b4f66658c651a61fcf5ca96" - integrity sha512-/Fgr29Q1bMDiv65BeCYmFR88otTg9QJYvmVIWrgkwWSkfya5h1XzCQYEz+VqyhWT1v+BQWq98SuyKfpNrL2cRA== - dependencies: - chalk "^4.1.2" - fastboot "3.3.2" + fastboot "4.1.5" + fastboot-express-middleware "4.1.2" fastboot-express-middleware@4.1.1: version "4.1.1" @@ -10099,6 +10091,14 @@ fastboot-express-middleware@4.1.1: chalk "^4.1.2" fastboot "4.1.1" +fastboot-express-middleware@4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/fastboot-express-middleware/-/fastboot-express-middleware-4.1.2.tgz#6a383c282fdc07ee3f90039701bb0dab11129179" + integrity sha512-vnzEBV7gZ3lSoGiqG/7+006nHNA3z+ZnU/5u9jPHtKpjH28yEbvZq6PnAeTu24UR98jZVR0pnFbfX0co+O9PeA== + dependencies: + chalk "^4.1.2" + fastboot "4.1.2" + fastboot-transform@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/fastboot-transform/-/fastboot-transform-0.1.3.tgz#7dea0b117594afd8772baa6c9b0919644e7f7dcd" @@ -10107,10 +10107,10 @@ fastboot-transform@^0.1.3: broccoli-stew "^1.5.0" convert-source-map "^1.5.1" -fastboot@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/fastboot/-/fastboot-3.3.2.tgz#bf1ac7b01937846b63423a88138e13eb50406d2e" - integrity sha512-2NKTW32GvEsDyBrdw1trW1JsbS+9/7sAQuKwkht12mNitimRrSKVLP2AxsM/HSXQE+aiET4XCfKdyeIy0kQbKQ== +fastboot@4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/fastboot/-/fastboot-4.1.1.tgz#b686dc522ef805557ff76ded23328c486991cbaa" + integrity sha512-XG7YprsAuAGZrUDhmJ0NFuEP0gpWg9LZwGWSS1I5+f0ETHKPWqb4x59sN2rU1nvCEETBK70z68tLsWsl9daomg== dependencies: chalk "^4.1.2" cookie "^0.4.1" @@ -10120,10 +10120,23 @@ fastboot@3.3.2: simple-dom "^1.4.0" source-map-support "^0.5.21" -fastboot@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/fastboot/-/fastboot-4.1.1.tgz#b686dc522ef805557ff76ded23328c486991cbaa" - integrity sha512-XG7YprsAuAGZrUDhmJ0NFuEP0gpWg9LZwGWSS1I5+f0ETHKPWqb4x59sN2rU1nvCEETBK70z68tLsWsl9daomg== +fastboot@4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/fastboot/-/fastboot-4.1.2.tgz#65627882d03962818f0f5331ca052d2da209ba98" + integrity sha512-VJLmF0xdCNwIIuA7DQtN1KTAKfEGsbZGJ0cfKh64h6DeMh3Fhr2FCCxkPh8zYqGoqzjXFdFbtk60WS3f6HKqBg== + dependencies: + chalk "^4.1.2" + cookie "^0.4.1" + debug "^4.3.3" + jsdom "^19.0.0" + resolve "^1.22.0" + simple-dom "^1.4.0" + source-map-support "^0.5.21" + +fastboot@4.1.5: + version "4.1.5" + resolved "https://registry.yarnpkg.com/fastboot/-/fastboot-4.1.5.tgz#ed24af3ed68a1a4428e8ff1dd0106c7edb2065ab" + integrity sha512-2FkJWrpxgJjy5kLb3KrYp0pKdB4WgT/6qxtQO7ozYtQqMBOAARMnp59xp/Hdosa1cE2jslZgwDAv3v11OlQfAw== dependencies: chalk "^4.1.2" cookie "^0.4.1"