zazuko / shacl-playground

Implementation of a fully client-side SHACL validation playground. Supports a wide variety of RDF serializations.
https://shacl-playground.zazuko.com/
Other
23 stars 7 forks source link

Dockerize #27

Closed ght closed 2 years ago

ght commented 2 years ago

Add a Dockerfile and document how to use it, the dev server, and the production build.

changeset-bot[bot] commented 2 years ago

⚠️ No Changeset found

Latest commit: deaa3039989e58cd14ae7cc3199993b2a293fde7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

ght commented 2 years ago

I'm new to writing dockerfiles, thank you for the feedback @ludovicm67! I followed your suggestions, tested it locally once more and force-pushed.

If you want me to add a changeset (as requested by @changeset-bot) let me know and I'll read into how to do that.


While at it, I also tried bumping the node image to v17 (current stable), but that caused the production build to fail with:

$ webpack --mode production                                                                                                                                                                                                                                                       
node:internal/crypto/hash:67                                                                                                                                                                                                                                                      
  this[kHandle] = new _Hash(algorithm, xofLen);                                                                                                                                                                                                                                   
                  ^                                                                                                                                                                                                                                                               

Error: error:0308010C:digital envelope routines::unsupported                                                                                                                                                                                                                      
    at new Hash (node:internal/crypto/hash:67:19)                                                                                                                                                                                                                                 
    at Object.createHash (node:crypto:130:10)                                                                                                                                                                                                                                     
    at module.exports (/build/node_modules/webpack/lib/util/createHash.js:135:53)                                                                                                                                                                                                 
    at NormalModule._initBuildHash (/build/node_modules/webpack/lib/NormalModule.js:417:16)                                                                                                                                                                                       
    at handleParseError (/build/node_modules/webpack/lib/NormalModule.js:471:10)                                                                                                                                                                                                  
    at /build/node_modules/webpack/lib/NormalModule.js:503:5                                                                                                                                                                                                                      
    at /build/node_modules/webpack/lib/NormalModule.js:358:12                                                                                                                                                                                                                     
    at /build/node_modules/loader-runner/lib/LoaderRunner.js:373:3                                                                                                                                                                                                                
    at iterateNormalLoaders (/build/node_modules/loader-runner/lib/LoaderRunner.js:214:10)                                                                                                                                                                                        
    at iterateNormalLoaders (/build/node_modules/loader-runner/lib/LoaderRunner.js:221:10)                                                                                                                                                                                        
    at /build/node_modules/loader-runner/lib/LoaderRunner.js:236:3                                                                                                                                                                                                                
    at context.callback (/build/node_modules/loader-runner/lib/LoaderRunner.js:111:13)                                                                                                                                                                                            
    at /build/node_modules/babel-loader/lib/index.js:59:71 {                                                                                                                                                                                                                      
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],                                                                                                                                                                                        
  library: 'digital envelope routines',                                                                                                                                                                                                                                           
  reason: 'unsupported',                                                                                                                                                                                                                                                          
  code: 'ERR_OSSL_EVP_UNSUPPORTED'                                                                                                                                                                                                                                                
}                                                                                                                                                                                                                                                                                 

Node.js v17.3.1                                                                                                                                                                                                                                                                   
error Command failed with exit code 1.

Just as a heads up, might be something to look into in the future (but might also just be some rookie mistake on my part).

tpluscode commented 2 years ago

@ght the problem you saw is with webpack 4 and latest node. See https://stackoverflow.com/questions/69394632/webpack-build-failing-with-err-ossl-evp-unsupported