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

Fix Docker build #196

Merged
merged 19 commits into from
Jul 13, 2024
Merged

Fix Docker build #196

merged 19 commits into from
Jul 13, 2024

Conversation

eliandoran
Copy link

@eliandoran eliandoran commented Jul 13, 2024

This is a follow-up of #192 (thanks to @chesspro13), focusing strictly on fixing the Docker build.

I started it from scratch because I had some errors at startup I could not understand, more specifically:

Error: Router not found for request GET /assets/v0.63.5/stylesheets/style.css
    at /usr/src/app/src/routes/error_handlers.js:15:19
    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:328:13)
    at /usr/src/app/node_modules/express/lib/router/index.js:286:9
    at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:346:12)
    at next (/usr/src/app/node_modules/express/lib/router/index.js:280:10)
    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:91:12)
    at trim_prefix (/usr/src/app/node_modules/express/lib/router/index.js:328:13)
    at /usr/src/app/node_modules/express/lib/router/index.js:286:9
    at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:346:12) {
  status: 404
}

Turns out we were missing some files:

In the original:

/usr/src/app/src/public # ls
app-dist              manifest.webmanifest  stylesheets
fonts                 robots.txt

But in our Docker image we have only:

/usr/src/app/src/public # ls
app-dist

Similarly we were missing the front-end files:

/usr/src/app/src/public/app-dist # ls
317.js                  760.js.map              mobile.js
317.js.map              784.js                  mobile.js.map
41.js                   784.js.map              setup.js
41.js.map               desktop.js              setup.js.map
749.js                  desktop.js.LICENSE.txt  share.js
749.js.map              desktop.js.map
760.js                  doc_notes

Ended up using a slightly different approach: we copy everything but the TypeScript files, then build the TypeScript files and copy those into the src folder.

@eliandoran eliandoran requested a review from a team July 13, 2024 08:51
@eliandoran eliandoran added this to the Alpha release milestone Jul 13, 2024
@eliandoran eliandoran mentioned this pull request Jul 13, 2024
5 tasks
Copy link

@chesspro13 chesspro13 left a comment

Choose a reason for hiding this comment

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

Here's to finally having a product!

@eliandoran eliandoran merged commit 5460359 into develop Jul 13, 2024
1 check passed
@eliandoran eliandoran deleted the feature/fix_docker_build branch July 13, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants