fix: pnpm in vite docker (#10344)

- Fix pnpm path in vite docker
- Remove webpack files
- fFx vite server port
This commit is contained in:
Vishnu Narayanan
2024-10-29 15:16:10 +05:30
committed by GitHub
parent 0689f59a05
commit 55dfd7db50
6 changed files with 13 additions and 44 deletions

14
docker/entrypoints/vite.sh Normal file → Executable file
View File

@@ -1,19 +1,11 @@
#!/bin/sh
set -e
set -x
rm -rf /app/tmp/pids/server.pid
rm -rf /app/tmp/cache/*
pnpm install --frozen-lockfile
echo "Waiting for pnpm and bundle integrity to match lockfiles...."
PNPM="pnpm list --json | grep -q 'Missing dependencies'"
BUNDLE="bundle check"
until ! $PNPM && $BUNDLE
do
sleep 2;
done
pnpm store prune
pnpm install
echo "Ready to run Vite development server."

View File

@@ -1,20 +0,0 @@
#!/bin/sh
set -e
rm -rf /app/tmp/pids/server.pid
rm -rf /app/tmp/cache/*
yarn install --check-files
echo "Waiting for yarn and bundle integrity to match lockfiles...."
YARN="yarn check --integrity"
BUNDLE="bundle check"
until $YARN && $BUNDLE
do
sleep 2;
done
echo "Ready to run webpack development server."
exec "$@"