Skip to content

Instantly share code, notes, and snippets.

@NoTimeForHero
Created March 11, 2023 13:32
Show Gist options
  • Save NoTimeForHero/064c2ec67b55cd7c7684464a937a95f0 to your computer and use it in GitHub Desktop.
Save NoTimeForHero/064c2ec67b55cd7c7684464a937a95f0 to your computer and use it in GitHub Desktop.
Run WebPack with primary service (like a php-fpm or rails puma)
#!/bin/bash
echo "Docker Entrypoint is called!"
cd /website
if [[ -f "/website/public/hot" ]]; then
echo "Removing HOT_RELOAD file"
rm /website/public/hot
fi
if [[ "$WEBPACK_DEV_SERVER" == "true" ]]; then
echo Starting daemonized WebPack Dev Server
npm run hot &
fi
exec "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment