From d5861558817369c9f769884669f9017f1b183bab Mon Sep 17 00:00:00 2001 From: Eric Eastwood <contact@ericeastwood.com> Date: Wed, 15 Feb 2017 17:50:09 -0600 Subject: [PATCH] Add option to disable webpack dev server livereload See https://gitlab.com/gitlab-org/gitlab-ce/issues/28204 --- .gitignore | 1 + Makefile | 3 +++ Procfile.example | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 23cada0..770e370 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ /host /port /webpack_port +/webpack_livereload /.ruby-version /.ruby-gemset /localhost.* diff --git a/Makefile b/Makefile index 1bef057..05a3785 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,8 @@ username = $(shell whoami) sshd_bin = $(shell which sshd) git_bin = $(shell which git) webpack_port = $(shell cat webpack_port 2>/dev/null || echo '3808') +# We count any existance as true +webpack_livereload = $(shell cat webpack_livereload 2>/dev/null || echo 'true') all: gitlab-setup gitlab-shell-setup gitlab-workhorse-setup support-setup gitaly-setup @@ -146,6 +148,7 @@ Procfile: -e "s|/usr/sbin/sshd|${sshd_bin}|"\ -e "s|postgres |${postgres_bin_dir}/postgres |"\ -e "s|DEV_SERVER_PORT=3808 |DEV_SERVER_PORT=${webpack_port} |"\ + -e "s|DEV_SERVER_LIVERELOAD=true |DEV_SERVER_LIVERELOAD=${webpack_livereload} |"\ $@.example > $@ if [ -f .vagrant_enabled ]; then \ echo "0.0.0.0" > host; \ diff --git a/Procfile.example b/Procfile.example index 5f909c3..261874a 100644 --- a/Procfile.example +++ b/Procfile.example @@ -14,4 +14,4 @@ rails-background-jobs: exec /usr/bin/env SIDEKIQ_LOG_ARGUMENTS=1 RAILS_ENV=devel #sshd: exec /usr/sbin/sshd -e -D -f /home/git/openssh/sshd_config #nginx: exec nginx -p /home/git/nginx -c conf/nginx.conf #gitaly: exec /usr/bin/env GITALY_SOCKET_PATH=/home/git/gitaly.socket GITALY_PROMETHEUS_LISTEN_ADDR=:9101 gitaly/bin/gitaly -webpack: exec /usr/bin/env NODE_ENV=development DEV_SERVER_PORT=3808 support/exec-cd gitlab npm run dev-server +webpack: exec /usr/bin/env NODE_ENV=development DEV_SERVER_PORT=3808 DEV_SERVER_LIVERELOAD=true support/exec-cd gitlab npm run dev-server -- GitLab