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:
11
Dockerfile
11
Dockerfile
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user