Commit 9f074abd authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'blackst0ne-rails5-support' into 'master'

Add support of Rails 5

See merge request gitlab-org/gitlab-development-kit!497
parents 6c5b086b 71446543
Pipeline #25382431 passed with stages
in 26 minutes and 4 seconds
......@@ -22,11 +22,13 @@ postgresql: exec support/postgresql-signal-wrapper postgres -D /home/git/postgre
gitaly: exec gitaly/bin/gitaly /home/git/gitaly/config.toml
gitlab-workhorse: exec /usr/bin/env PATH="/home/git/gitlab-workhorse/bin:$PATH" gitlab-workhorse -authSocket /home/git/gitlab.socket -listenAddr $host:$port -documentRoot /home/git/gitlab/public -developmentMode -secretPath /home/git/gitlab/.gitlab_workhorse_secret -config /home/git/gitlab-workhorse/config.toml
rails-background-jobs: exec /usr/bin/env SIDEKIQ_LOG_ARGUMENTS=1 RAILS_ENV=development RAILS_RELATIVE_URL_ROOT=$relative_url_root support/exec-cd gitlab bin/background_jobs start_foreground
rails5-background-jobs: exec /usr/bin/env BUNDLE_GEMFILE=Gemfile.rails5 RAILS5=1 SIDEKIQ_LOG_ARGUMENTS=1 RAILS_ENV=development RAILS_RELATIVE_URL_ROOT=$relative_url_root support/exec-cd gitlab bin/background_jobs start_foreground
# Frontend services
#
webpack: exec /usr/bin/env NODE_ENV=development DEV_SERVER_PORT=3808 support/exec-cd gitlab yarn dev-server
rails-web: exec /usr/bin/env RAILS_ENV=development RAILS_RELATIVE_URL_ROOT=$relative_url_root support/exec-cd gitlab bin/web start_foreground
rails5-web: exec /usr/bin/env BUNDLE_GEMFILE=Gemfile.rails5 RAILS5=1 RAILS_ENV=development RAILS_RELATIVE_URL_ROOT=$relative_url_root support/exec-cd gitlab bin/web start_foreground
# Docker
#
......
......@@ -94,7 +94,11 @@ Check the [GitLab Geo instructions](./howto/geo.md).
Start GitLab and all required services:
```sh
# Rails 4 (current stable)
gdk run
# Rails 5.0 (next version, we're migrating to it now)
gdk run rails5
```
To start only the databases use:
......@@ -106,7 +110,11 @@ gdk run db
To start only the app (assuming the DBs are already running):
```sh
# Rails 4 (current stable)
gdk run app
# Rails 5.0 (next version, we're migrating to it now)
gdk run app rails5
```
To access GitLab you may now go to http://localhost:3000 in your
......
......@@ -45,7 +45,12 @@ geo_db() {
app() {
print_url
foreman_start -m all=0,rails-web=1,rails-background-jobs=1,gitlab-workhorse=1,nginx=1,grafana=1,sshd=1,gitaly=1,storage-check=1
if [ "$1" = "rails5" ]; then
foreman_start -m all=0,rails-web=0,rails5-web=1,rails-background-jobs=0,rails5-background-jobs=1,gitlab-workhorse=1,nginx=1,grafana=1,sshd=1,gitaly=1,storage-check=1
else
foreman_start -m all=0,rails-web=1,rails5-web=0,rails-background-jobs=1,rails5-background-jobs=0,gitlab-workhorse=1,nginx=1,grafana=1,sshd=1,gitaly=1,storage-check=1
fi
}
grafana() {
......@@ -62,7 +67,12 @@ gitaly() {
all() {
print_url
foreman_start
if [ "$1" = "rails5" ]; then
foreman_start -m all=1,rails-web=0,rails-background-jobs=0
else
foreman_start -m all=1,rails5-web=0,rails5-background-jobs=0
fi
}
main() {
......@@ -93,7 +103,7 @@ main() {
geo_db
;;
xapp)
app
app "$2"
;;
xgrafana)
grafana
......@@ -104,6 +114,9 @@ main() {
xgitaly)
gitaly
;;
xrails5)
all "rails5"
;;
x*)
all
;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment