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

Update Node.js to v16 and update frontend dependencies #519

Merged
merged 29 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9073cdf
Use npm audit to update npm packages
Splines Jun 19, 2023
31b0550
Use Node.js version 16 in Docker development
Splines Jun 20, 2023
4ac0062
Use node after installation
Splines Jun 20, 2023
9557ea2
Split installation of Node.js to multiple RUN commands
Splines Jun 21, 2023
f60c4fb
Uniy sass packages and update yarn lock
Splines Jun 21, 2023
4b0df7a
Reflect changes in production and test Dockerfiles
Splines Jun 21, 2023
8777bcf
Add comments to Dockerfile and tighten run commands
Splines Jun 21, 2023
361e19e
Add sass-loader back as dependency
Splines Jun 21, 2023
ab67db4
Switch back to old version of sass-loader
Splines Jun 21, 2023
bd3146f
Use "-no-install-recommends" for yarn install in prod
Splines Jun 21, 2023
9265739
Use consistent ${} syntax in Dockerfile & fix Node path
Splines Jun 21, 2023
12c20b8
Copy Node.js over to /usr/local
Splines Jun 21, 2023
e1cbade
Apply quote arguments suggestion (in code review)
Splines Jun 23, 2023
5bad229
Quote arguments in other Dockerfiles as well
Splines Jun 23, 2023
96f8379
Replace deprecated apt-key and improve Dockerfiles
Splines Jun 23, 2023
b681e56
Upgrade to Yarn 2 and add packages for non-error webpack build
Splines Jun 23, 2023
8cbe0ce
Copy Yarn to usr folder alongside other Node.js tooling
Splines Jun 24, 2023
a15a28e
Activate Yarn for app user
Splines Jun 24, 2023
82a2175
Only copy node over to usr folder
Splines Jun 24, 2023
a5f057f
Go back to Yarn1 and explicitly set Yarn version
Splines Jun 25, 2023
10dfa35
Remove ".yarn" from .gitignore
Splines Jun 25, 2023
1a7018b
Remove unnecessary dependencies from package.json
Splines Jun 25, 2023
b9172d3
Add back missing "--production=false" to "yarn install"
Splines Jun 26, 2023
63de309
Use "ruby:3.1.4-bullseye" to have PostgreSQL available
Splines Jun 26, 2023
67676e4
Add missing `apt update` in dev and test Dockerfiles
Splines Jun 26, 2023
9868679
Group `update` and `install` in one RUN statement
Splines Jun 26, 2023
01db6bb
Remove superfluous newline
Splines Jun 26, 2023
4fae533
Make Node.js version logging one RUN statement
Splines Jun 26, 2023
5ad36ce
Explicitly set `--production=true` during `yarn install`
Splines Jun 26, 2023
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
18 changes: 6 additions & 12 deletions docker/development/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ RUN GOOS=js GOARCH=wasm go build -o pdfcomprezzor.wasm
RUN cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" .

# Now build the actual mampf application
FROM ruby:3.1.4
# https://hub.docker.com/_/ruby/
FROM ruby:3.1.4-bullseye
ENV RAILS_ENV=production

EXPOSE 3000
EXPOSE 9394

Expand Down Expand Up @@ -45,20 +47,12 @@ RUN which yarn; yarn --version
# yarn avaialble instead of our specified version
RUN yarn set version "${YARN_VERSION}"

# Setup Postgres repository
# see https://wiki.postgresql.org/wiki/Apt
RUN apt-get update
RUN apt-get install -y lsb-release
RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
# update again with the new repository for postgres added
RUN apt-get update
RUN apt-get install -y postgresql-client-13

# Install other dependencies
# Note that postgresql-client-13 is available through debian bullseye
# that the ruby image is based on
RUN apt-get install -y --no-install-recommends \
Splines marked this conversation as resolved.
Show resolved Hide resolved
ffmpeg imagemagick pdftk ghostscript shared-mime-info \
libarchive-tools sqlite3 wget wait-for-it
libarchive-tools postgresql-client-13 sqlite3 wget wait-for-it

# Setup ImageMagick
RUN sed -i '/disable ghostscript format types/,+6d' /etc/ImageMagick-6/policy.xml
Expand Down
18 changes: 6 additions & 12 deletions docker/run_cypress_tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ RUN GOOS=js GOARCH=wasm go build -o pdfcomprezzor.wasm
RUN cp "$(go env GOROOT)/misc/wasm/wasm_exec.js" .

# Now build the actual mampf application
FROM ruby:3.1.4
# https://hub.docker.com/_/ruby/
FROM ruby:3.1.4-bullseye
ENV RAILS_ENV=production

EXPOSE 3000

# use "--login" option, so that .bashrc is sourced in new shells
Expand Down Expand Up @@ -44,20 +46,12 @@ RUN which yarn; yarn --version
# yarn avaialble instead of our specified version
RUN yarn set version "${YARN_VERSION}"

# Setup Postgres repository
# see https://wiki.postgresql.org/wiki/Apt
RUN apt-get update
RUN apt-get install -y lsb-release
RUN curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/trusted.gpg.d/apt.postgresql.org.gpg >/dev/null
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
# update again with the new repository for postgres added
RUN apt-get update
RUN apt-get install -y postgresql-client-13

# Install other dependencies
# Note that postgresql-client-13 is available through debian bullseye
# that the ruby image is based on
RUN apt-get install -y --no-install-recommends \
Splines marked this conversation as resolved.
Show resolved Hide resolved
ffmpeg imagemagick pdftk ghostscript shared-mime-info \
libarchive-tools sqlite3 wget wait-for-it
libarchive-tools postgresql-client-13 sqlite3 wget wait-for-it

# Setup ImageMagick
RUN sed -i '/disable ghostscript format types/,+6d' /etc/ImageMagick-6/policy.xml
Expand Down