Skip to content

Commit

Permalink
Specify Playwright browser during setup
Browse files Browse the repository at this point in the history
  • Loading branch information
hulloitskai committed Dec 12, 2023
1 parent 84d4d3f commit f2f48e5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
# Install NodeJS and Yarn
COPY .node-version ./
RUN git clone --depth 1 https://github.com/nodenv/node-build.git \
&& PREFIX=/usr/local ./node-build/install.sh \
&& node-build "$(cat .node-version)" /usr/local \
&& PREFIX=/tmp ./node-build/install.sh \
&& /tmp/bin/node-build "$(cat .node-version)" /usr/local \
&& npm install --global yarn \
&& npm cache clean --force \
&& rm -rf ./node-build \
&& rm -rf ./node-build /tmp/* \
&& node --version && npm --version && yarn --version

# Install Python and Poetry
Expand All @@ -28,21 +28,21 @@ RUN git clone --depth 1 --no-checkout https://github.com/pyenv/pyenv.git \
&& cd pyenv && git sparse-checkout set ./plugins/python-build \
&& git checkout && cd .. \
&& mv ./pyenv/plugins/python-build ./python-build && rm -r ./pyenv \
&& PREFIX=/usr/local ./python-build/install.sh \
&& python-build "$(cat .python-version)" /usr/local \
&& PREFIX=/tmp ./python-build/install.sh \
&& /tmp/bin/python-build "$(cat .python-version)" /usr/local \
&& pip3 install --no-cache-dir poetry \
&& rm -rf ./python-build \
&& rm -rf ./python-build /tmp/* \
&& python3 --version && pip3 --version

# Install Ruby and Bundler
COPY .ruby-version ./
ENV LANG=C.UTF-8 GEM_HOME=/usr/local/bundle
ENV BUNDLE_SILENCE_ROOT_WARNING=1 BUNDLE_APP_CONFIG="$GEM_HOME" PATH="$GEM_HOME/bin:$PATH"
RUN git clone --depth 1 https://github.com/rbenv/ruby-build.git \
&& PREFIX=/usr/local ./ruby-build/install.sh \
&& PREFIX=/tmp ./ruby-build/install.sh \
&& mkdir -p "$GEM_HOME" && chmod 1777 "$GEM_HOME" \
&& ruby-build "$(cat .ruby-version)" /usr/local \
&& rm -rf ./ruby-build \
&& /tmp/bin/ruby-build "$(cat .ruby-version)" /usr/local \
&& rm -rf ./ruby-build /tmp/* \
&& ruby --version && gem --version && bundle --version

# Install runtime dependencies
Expand All @@ -64,8 +64,8 @@ RUN yarn global add playwright \

# Install NodeJS dependencies
COPY package.json yarn.lock ./
ENV NODE_ENV="$RAILS_ENV"
RUN yarn install && yarn cache clean
ENV NODE_ENV=production
RUN yarn install --production && yarn cache clean

# Install Python dependencies
COPY pyproject.toml poetry.toml poetry.lock ./
Expand Down
2 changes: 1 addition & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ FileUtils.chdir APP_ROOT do

puts "\n=> Installing Playwright"
system! "bin/yarn global add playwright"
system! "playwright install"
system! "playwright install chromium"

# puts "\n=> Copying sample files"
# unless File.exist?("config/database.yml")
Expand Down

0 comments on commit f2f48e5

Please sign in to comment.