From 0d49e8b2db3256370572eb029fbc0195830392f9 Mon Sep 17 00:00:00 2001 From: Phil Hughes <me@iamphill.com> Date: Fri, 13 Jan 2017 11:07:35 -0500 Subject: [PATCH 1/7] Added webpack to Procfile --- Procfile.example | 1 + 1 file changed, 1 insertion(+) diff --git a/Procfile.example b/Procfile.example index 94c61da..ef756aa 100644 --- a/Procfile.example +++ b/Procfile.example @@ -14,3 +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 support/exec-cd gitlab npm run dev-server -- GitLab From aaac1ed9bb5ec25c5392f265afd25ba6e60a827c Mon Sep 17 00:00:00 2001 From: Mike Greiling <mike@pixelcog.com> Date: Fri, 13 Jan 2017 19:22:12 -0500 Subject: [PATCH 2/7] add webpack to "gdk run app" command --- run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run b/run index 14ed523..082dfa2 100755 --- a/run +++ b/run @@ -55,7 +55,7 @@ db() { app() { print_port - foreman_start -c all=0,rails-web=1,rails-background-jobs=1,gitlab-workhorse=1,nginx=1,grafana=1,sshd=1,gitaly=1 + foreman_start -c all=0,rails-web=1,rails-background-jobs=1,gitlab-workhorse=1,nginx=1,grafana=1,sshd=1,gitaly=1,webpack=1 } grafana() { -- GitLab From 8612ca264c53f512ad90e4f604bb1ee5a024800c Mon Sep 17 00:00:00 2001 From: Phil Hughes <me@iamphill.com> Date: Thu, 19 Jan 2017 09:41:16 +0000 Subject: [PATCH 3/7] Document webpack port file --- .gitignore | 1 + doc/set-up-gdk.md | 1 + 2 files changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index c54530a..c384997 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ /.vagrant_enabled /host /port +/webpack_port /.ruby-version /.ruby-gemset /localhost.* diff --git a/doc/set-up-gdk.md b/doc/set-up-gdk.md index 8ef6f66..68be4e1 100644 --- a/doc/set-up-gdk.md +++ b/doc/set-up-gdk.md @@ -63,6 +63,7 @@ gem install gitlab-development-kit gdk init gdk-ee cd gdk-ee echo 3001 > port +echo 3809 > webpack_port gdk install gitlab_repo=https://gitlab.com/gitlab-org/gitlab-ee.git ``` -- GitLab From 21350d8a9455d4ddf038efc266843d05c7dcadd9 Mon Sep 17 00:00:00 2001 From: Mike Greiling <mike@pixelcog.com> Date: Wed, 1 Feb 2017 14:20:54 -0600 Subject: [PATCH 4/7] move webpack from app group to db group --- run | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run b/run index 082dfa2..54ec457 100755 --- a/run +++ b/run @@ -50,12 +50,12 @@ foreman_start() { } db() { - foreman_start -c all=0,redis=1,postgresql=1,openldap=1,influxdb=1 + foreman_start -c all=0,redis=1,postgresql=1,openldap=1,influxdb=1,webpack=1 } app() { print_port - foreman_start -c all=0,rails-web=1,rails-background-jobs=1,gitlab-workhorse=1,nginx=1,grafana=1,sshd=1,gitaly=1,webpack=1 + foreman_start -c all=0,rails-web=1,rails-background-jobs=1,gitlab-workhorse=1,nginx=1,grafana=1,sshd=1,gitaly=1 } grafana() { -- GitLab From 2e7dc210422077320f549e7bd7ee94ec1222044a Mon Sep 17 00:00:00 2001 From: Mike Greiling <mike@pixelcog.com> Date: Wed, 1 Feb 2017 14:21:30 -0600 Subject: [PATCH 5/7] configure webpack-dev-server in both Procfile and gitlab.yml based on webpack_port --- Makefile | 10 ++++++---- Procfile.example | 2 +- support/edit-gitlab.yml | 7 +++++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4befeed..1bef057 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ port = $(shell cat port 2>/dev/null) username = $(shell whoami) sshd_bin = $(shell which sshd) git_bin = $(shell which git) +webpack_port = $(shell cat webpack_port 2>/dev/null || echo '3808') all: gitlab-setup gitlab-shell-setup gitlab-workhorse-setup support-setup gitaly-setup @@ -29,7 +30,7 @@ gitlab/config/gitlab.yml: sed -e "s|/home/git|${gitlab_development_root}|"\ -e "s|/usr/bin/git|${git_bin}|"\ gitlab/config/gitlab.yml.example > gitlab/config/gitlab.yml - port=${port} support/edit-gitlab.yml gitlab/config/gitlab.yml + port=${port} webpack_port=${webpack_port} support/edit-gitlab.yml gitlab/config/gitlab.yml gitlab/config/database.yml: sed "s|/home/git|${gitlab_development_root}|" database.yml.example > gitlab/config/database.yml @@ -142,9 +143,10 @@ support-setup: .ruby-version foreman Procfile redis postgresql openssh-setup ngi Procfile: sed -e "s|/home/git|${gitlab_development_root}|g"\ - -e "s|/usr/sbin/sshd|${sshd_bin}|"\ - -e "s|postgres |${postgres_bin_dir}/postgres |"\ - $@.example > $@ + -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} |"\ + $@.example > $@ if [ -f .vagrant_enabled ]; then \ echo "0.0.0.0" > host; \ echo "3000" > port; \ diff --git a/Procfile.example b/Procfile.example index ef756aa..5f909c3 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 support/exec-cd gitlab npm run dev-server +webpack: exec /usr/bin/env NODE_ENV=development DEV_SERVER_PORT=3808 support/exec-cd gitlab npm run dev-server diff --git a/support/edit-gitlab.yml b/support/edit-gitlab.yml index 8a01934..94f5130 100755 --- a/support/edit-gitlab.yml +++ b/support/edit-gitlab.yml @@ -12,5 +12,12 @@ a ssh_port: 2222 ssh_host: localhost . +/ webpack:/ +a + dev_server: + enabled: true + host: localhost + port: ${webpack_port:-3808} +. wq EOF -- GitLab From 88e12edaa502ef2ae30557292c1cab89d7e29126 Mon Sep 17 00:00:00 2001 From: Mike Greiling <mike@pixelcog.com> Date: Wed, 1 Feb 2017 15:42:07 -0600 Subject: [PATCH 6/7] ignore .gitlab-npm file --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c384997..23cada0 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ /nginx/uwsgi_temp /.gitlab-shell-bundle /.gitlab-bundle +/.gitlab-npm /gem/*.gem /gitlab-runner-config.toml /.gdk-install-root -- GitLab From 0b98f5e79b5d19cecdaf2d164b64b45d83ed3538 Mon Sep 17 00:00:00 2001 From: Mike Greiling <mike@pixelcog.com> Date: Wed, 1 Feb 2017 15:45:04 -0600 Subject: [PATCH 7/7] update CHANGELOG.md for !237 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b408679..9d4dbfd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ This Changelog tracks major changes to the GitLab Development Kit, such as dependency updates (those not handled by Bundler) and new features. +## 2017-02-01 + +- Add webpack process to Procfile configure it within gitlab.yml !237 + ## 2016-10-31 - Add root check to catch root move problems. Requires gem 0.2.3 or -- GitLab