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

Make build dirs parameterizable via BUILD_DIR new runtime env var #3087

Merged
merged 7 commits into from Feb 21, 2022

Conversation

sneridagh
Copy link
Member

Since Volto is parameterizable on runtime, it's been a while since I wanted to do this.

So, on release, it will create a plain build and upload it to the repo in the dist folder.

The build supposed before this PR that it was going to be in build always. Now you can parameterize with: BUILD_DIR runtime env var. In case you want to run from somewhere else.

yarn
BUILD_DIR=dist node dist/server.js

or

yarn
yarn start:dist

Unfortunately, the initial yarn install is required still... :(

/cc @avoinea @ericof I hope this eases even more the Docker image builds.

@netlify
Copy link

netlify bot commented Feb 19, 2022

✔️ Deploy Preview for volto ready!

🔨 Explore the source changes: e12b3a3

🔍 Inspect the deploy log: https://app.netlify.com/sites/volto/deploys/6213521e258f9400082c5a95

😎 Browse the preview: https://deploy-preview-3087--volto.netlify.app/configuration/environmentvariables.html

* master:
  Proper directory where run the docs. Disable docs-linkcheckbroken for now
  Fix Python version in docs.yml GHA
  Plone 6 docs (#3001)
!!! important
`ADDONS` does *not* work for development packages, which are *always* enabled if defined in your `jsconfig.json` or via `mrs.developer.json`.
```{important}
`ADDONS` does *not* work for development packages, which are *always* enabled if defined in your `jsconfig.json` or via `mrs.developer.json`.
Copy link
Contributor

Choose a reason for hiding this comment

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

I find this line misleading. ADDONS shouldn't care if an addon comes from node_modules or is aliased via jsconfig.

I think the message is "The ADDONS key is a Volto specific configuration. Simply setting ADDONS doesn't download the javascript package. This has to be covered by another way, either installing the addon package (with yarn add) or loading it as a development package with mrs-developer.

Copy link
Member Author

Choose a reason for hiding this comment

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

I wanted to state clearly that a developer add-on is always enabled, if declared in mrs-developer and thus, in jsconfig.js. I'll try to merge both ideas.

Copy link
Member Author

Choose a reason for hiding this comment

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

but maybe that clarification has to be done elsewhere, not referred to ADDONS env var...

@sneridagh sneridagh merged commit 3ab9f6d into master Feb 21, 2022
@sneridagh sneridagh deleted the saveLocalBuildOnRelease branch February 21, 2022 15:28
mamico added a commit that referenced this pull request Aug 29, 2022
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.

None yet

2 participants