Skip to content

Commit

Permalink
Use everywhere NODE_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
EGiataganas committed Aug 11, 2023
1 parent e73f643 commit 278fa23
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ jobs:
if: ${{ inputs.language-versions == true }}
run: |
NODE_VERSION=$(cat .node-version)
if ! grep -q "^ARG NODE_MAJOR=$NODE_VERSION" Dockerfile; then
echo "Dockerfile has wrong node: $(grep '^ARG NODE_MAJOR' Dockerfile)" >&2
if ! grep -q "^ARG NODE_VERSION=$NODE_VERSION" Dockerfile; then
echo "Dockerfile has wrong node: $(grep '^ARG NODE_VERSION' Dockerfile)" >&2
exit 1
fi
if ! grep -q "^ARG NODE_MAJOR=$NODE_VERSION" Dockerfile.production; then
echo "Dockerfile.production has wrong node: $(grep '^ARG NODE_MAJOR' Dockerfile.production)" >&2
if ! grep -q "^ARG NODE_VERSION=$NODE_VERSION" Dockerfile.production; then
echo "Dockerfile.production has wrong node: $(grep '^ARG NODE_VERSION' Dockerfile.production)" >&2
exit 1
fi
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ COPY Gemfile Gemfile.lock ./
RUN bundle

## Node
ARG NODE_MAJOR
RUN curl -fsSL https://deb.nodesource.com/setup_$NODE_MAJOR.x | bash -
ARG NODE_VERSION
RUN curl -fsSL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash -
RUN apt-get install -y nodejs

## Yarn
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.production
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ ENV LANG=en_US.UTF-8
RUN locale-gen

# Install NODE_MAJOR
ARG NODE_MAJOR=18
ARG NODE_VERSION=18
RUN bash -c "export DEBIAN_FRONTEND=noninteractive && \
curl -sL https://deb.nodesource.com/setup_$NODE_MAJOR.x | bash - && \
curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - && \
apt-get update && apt-get install -y nodejs"

# Install Yarn via Debian package repository
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
args:
RUBY_VERSION: '3.2.2'
BUNDLER_VERSION: '2.4.17'
NODE_MAJOR: '18'
NODE_VERSION: '18'
entrypoint: ./docker-entrypoint.sh
command: bash -c "bundle exec rails s -b 0.0.0.0 -p 3000"
stdin_open: true
Expand Down

0 comments on commit 278fa23

Please sign in to comment.