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

Continuous Release 1.7.2 (Patch) #522

Merged
merged 2 commits into from
Jun 27, 2023
Merged

Continuous Release 1.7.2 (Patch) #522

merged 2 commits into from
Jun 27, 2023

Conversation

Splines
Copy link
Member

@Splines Splines commented Jun 27, 2023

* Use npm audit to update npm packages

* Use Node.js version 16 in Docker development

also changed shell to bash
We use nvm to install Node.js as nodesource distributions somehow
always install Node.js 18 instead
(see nodesource/distributions#1583)

* Use node after installation

* Split installation of Node.js to multiple RUN commands

Also alias the default version
If you want to see the full output during Docker build,
you can use the "--progress=plain" option.

* Uniy sass packages and update yarn lock

* Reflect changes in production and test Dockerfiles

* Add comments to Dockerfile and tighten run commands

* Add sass-loader back as dependency

* Switch back to old version of sass-loader

This is because we still use webpacker v4 currently.
We will upgrade this depenedency when we switch from @rails/webpacker
to webpack in the future.

* Use "-no-install-recommends" for yarn install in prod

This is so that Node.js is not installed again, which would result in v18,
which we don't want at the moment.

* Use consistent ${} syntax in Dockerfile & fix Node path

* Copy Node.js over to /usr/local

This ensures that the app user can access node that was previously
installed with nvm in /root/.nvm

* Apply quote arguments suggestion (in code review)

Co-authored-by: Christian Heusel <christian@heusel.eu>

* Quote arguments in other Dockerfiles as well

* Replace deprecated apt-key and improve Dockerfiles

- Replaced Yarn installation with "corepack", a new binary shipped with
Node.js starting with v16. This also means that Yarn is upgraded from v1 to v2
with a different CLI, e.g. we now use "yarn workspaces focus"
instead of "yarn install" to install the dependencies for the workspace
in the current working directory.
- Update GPG key handling during PostgreSQL installation
- Added some more comments to the Dockerfile
- Moved copying of Node.js up in the Dockerfile

More yarn-related changed in subsequent commits.

* Upgrade to Yarn 2 and add packages for non-error webpack build

* Copy Yarn to usr folder alongside other Node.js tooling

* Activate Yarn for app user

* Only copy node over to usr folder

* Go back to Yarn1 and explicitly set Yarn version

- Added a fix so that corepack really installs the version we want
and not some other old version
- with Yarn2+, building curerntly fails, so we switch back to Yarn1 and
deal with an upgrade of Yarn in the future

* Remove ".yarn" from .gitignore

Yarn1 does not generate this folder

* Remove unnecessary dependencies from package.json

"unnecessary" means dependencies that were added when trying out Yarn2+

* Add back missing "--production=false" to "yarn install"

* Use "ruby:3.1.4-bullseye" to have PostgreSQL available

* Add missing `apt update` in dev and test Dockerfiles

Co-authored-by: Christian Heusel <christian@heusel.eu>

* Group `update` and `install` in one RUN statement

(in prod Dockerfile)

* Remove superfluous newline

* Make Node.js version logging one RUN statement

* Explicitly set `--production=true` during `yarn install`

---------

Co-authored-by: Christian Heusel <christian@heusel.eu>
@Splines Splines self-assigned this Jun 27, 2023
@codecov

This comment was marked as off-topic.

Merge main into mampf-next
@Splines Splines merged commit de82635 into main Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants