Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup: add docker file #930

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
npm-debug.log
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Utilize the Node.js 18 official image
FROM node:18-alpine
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the current latest version?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current version in v20.17.0 using this one because in our volta package 18 version is pinned


# 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"]
1 change: 0 additions & 1 deletion app/constants/urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`,
Expand Down
5 changes: 3 additions & 2 deletions fastboot-server.js
Original file line number Diff line number Diff line change
@@ -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({
Expand All @@ -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.
});
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
57 changes: 35 additions & 22 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down
Loading