feat: switch from npm to yarn (#500)

* feat: switch from npm to yarn

* fix: build

* fix: replace yarn run with yarn

* fix: nodejs version install in Docker image

* fix: initialize mobx state

Co-authored-by: Karol Sójko <karolsojko@gmail.com>
This commit is contained in:
Baptiste Grob
2020-12-08 14:59:22 +01:00
committed by GitHub
parent a6d0319fb7
commit 993d241c72
14 changed files with 7975 additions and 13179 deletions

View File

@@ -1,4 +1,4 @@
FROM ruby:2.7.1-alpine
FROM ruby:2.7.1-alpine3.12
ARG UID=1000
ARG GID=1000
@@ -7,10 +7,11 @@ RUN addgroup -S webapp -g $GID && adduser -D -S webapp -G webapp -u $UID
RUN apk add --update --no-cache \
alpine-sdk \
nodejs \
nodejs-current \
python2 \
git \
nodejs-npm \
yarn \
tzdata
WORKDIR /app/
@@ -19,17 +20,17 @@ RUN chown -R $UID:$GID .
USER webapp
COPY --chown=$UID:$GID package.json package-lock.json Gemfile Gemfile.lock /app/
COPY --chown=$UID:$GID package.json yarn.lock Gemfile Gemfile.lock /app/
COPY --chown=$UID:$GID vendor /app/vendor
RUN npm ci
RUN yarn install --pure-lockfile
RUN gem install bundler && bundle install
COPY --chown=$UID:$GID . /app/
RUN npm run bundle
RUN yarn bundle
RUN bundle exec rails assets:precompile