Skip to content

Commit

Permalink
in docker, just use npm to avoid complexity
Browse files Browse the repository at this point in the history
  • Loading branch information
compwron committed Jan 13, 2025
1 parent b14ad7e commit b4fdd88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,6 @@ npm-debug.log
# In case we want to keep something in the compiled assets directory
!/app/assets/builds/.keep
.aider*

# ignore package-lock.json for now, but someday we will switch from yarn to npm
package-lock.json
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,12 @@ RUN apk update && apk upgrade && apk add --update --no-cache \
postgresql-client \
tzdata \
vim && rm -rf /var/cache/apk/*
# The ruby alpine image's apk doesn't have the current version of node
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ nodejs npm

WORKDIR $RAILS_ROOT

COPY . .
RUN npm install --global yarn
RUN yarn install
RUN yarn build && yarn build:css
RUN npm install
RUN npm build && npm build:css

COPY --from=builder /usr/local/bundle/ /usr/local/bundle/

Expand Down

0 comments on commit b4fdd88

Please sign in to comment.