Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Replace foreman with overmind

Aaron Contreras42172a15dfe4
diff --git a/.env.example b/.env.example
index f4efd0a7bcb..0f9a38e9741 100644
--- a/.env.example
+++ b/.env.example
@@ -27,7 +27,7 @@
#++
# If you place a .env file into the root directory of OpenProject
-# you can override some default settings that foreman will use
+# you can override some default settings that overmind will use
# to start OpenProject
# This is used to prevent people from using the new docker-compose file for automated installs
diff --git a/.gitignore b/.gitignore
index a6dcbe37c69..a23e38ac0c9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -95,6 +95,7 @@ npm-debug.log*
/.rvmrc*
/.ruby-gemset
/.foreman
+/.overmind.env
.DS_Store
*.icloud
.rspec
diff --git a/bin/dev b/bin/dev
index 5dbf7de0c83..686781e2c89 100755
--- a/bin/dev
+++ b/bin/dev
@@ -1,10 +1,17 @@
#!/usr/bin/env bash
-if ! command -v foreman &> /dev/null
-then
- echo "Installing foreman..."
- gem install foreman
-fi
+function fallback_to_foreman() {
+ echo 'Overmind not installed. Falling back to foreman...'
+ if ! command -v foreman &> /dev/null; then
+ echo 'Installing foreman...'
+ gem install foreman
+ fi
-foreman start -f Procfile.dev
+ foreman start -f Procfile.dev
+}
+if command -v overmind &> /dev/null; then
+ overmind start -f Procfile.dev
+else
+ fallback_to_foreman
+fi
diff --git a/bin/setup_dev b/bin/setup_dev
index 31c40fc77bf..76f3166051c 100755
--- a/bin/setup_dev
+++ b/bin/setup_dev
@@ -32,10 +32,13 @@ echo '- Rails server `RAILS_ENV=development bin/rails server`'
echo '- Angular CLI: `npm run serve`'
echo '- Delayed Job worker: `RAILS_ENV=development bin/rails jobs:work`'
echo ""
-echo 'You can also run `foreman start -f Procfile.dev` to run all the above on a single terminal.'
+echo 'You can also run `bin/dev` to run all the above on a single terminal.'
+echo ""
+echo "If you'd like an enhanced development experience and interaction"
+echo 'with the individual services, install Overmind. `bin/dev` will'
+echo 'prefer using Overmind over Foreman if available.'
echo ""
echo 'Setting up git hooks'
echo 'If you want to have commit hooks for rubocop and eslint errors, you can install lefthook like so:'
echo '`bundle exec lefthook install`'
-
diff --git a/docs/development/development-environment-osx/README.md b/docs/development/development-environment-osx/README.md
index 14a0cc98d21..3978dc4b234 100644
--- a/docs/development/development-environment-osx/README.md
+++ b/docs/development/development-environment-osx/README.md
@@ -187,25 +187,28 @@ Now, run the following tasks to migrate and seed the dev database, and prepare t
RAILS_ENV=development bin/rails db:seed
```
1
-## Run OpenProject through foreman
+## Run OpenProject through overmind
-You can run all required workers of OpenProject through `foreman`, which combines them in a single tab. This is useful for starting out,
-however most developers end up running the tasks in separate shells for better understanding of the log output, since foreman will combine all of them.
-The `bin/dev` command will check if `foreman` is available, install it if needed and will run the application via `Procfile.dev`.
+You can run all required workers of OpenProject through `overmind`, which combines them in a single tab. Optionally, you may also
+run `overmind` as a daemon and connect to services individually.
+The `bin/dev` command will first check if `overmind` is available and run the application if via `Procfile.dev` if possible. If not,
+it falls back to `foreman`, installing it if needed.
```bash
bin/dev
```
The application will be available at `http://127.0.0.1:3000`. To customize bind address and port copy the `.env.example` provided in the root of this
-project as `.env` and [configure values](https://ddollar.github.io/foreman/#ENVIRONMENT) as required.
+project as `.env` and [configure values](https://github.com/DarthSim/overmind/tree/v2.4.0#overmind-environment) as required.
By default a worker process will also be started. In development asynchronous execution of long-running background tasks (sending emails, copying projects,
-etc.) may be of limited use and it has known issues with regards to memory (see background worker section below). To disable the worker process:. To disable the worker process:
+etc.) may be of limited use and it has known issues with regards to memory (see background worker section below). To disable the worker process:
-echo "concurrency: web=1,assets=1,worker=0" >> .foreman
+```bash
+echo "OVERMIND_IGNORED_PROCESSES=worker" >> .overmind.env
+```
-For more information refer to Foreman documentation section on [default options](https://ddollar.github.io/foreman/#DEFAULT-OPTIONS).
+For more information refer to the great Overmind documentation [usage section](https://github.com/DarthSim/overmind/tree/v2.4.0#usage).
You can access the application with the admin-account having the following credentials:
diff --git a/docs/development/development-environment-ubuntu/README.md b/docs/development/development-environment-ubuntu/README.md
index 0767d74e034..24e4f444fcf 100644
--- a/docs/development/development-environment-ubuntu/README.md
+++ b/docs/development/development-environment-ubuntu/README.md
@@ -238,25 +238,28 @@ Now, run the following tasks to seed the dev database, and prepare the test setu
RAILS_ENV=development bin/rails db:seed
```
-## Run OpenProject through foreman
+## Run OpenProject through overmind
-You can run all required workers of OpenProject through `foreman`, which combines them in a single tab. This is useful for starting out,
-however most developers end up running the tasks in separate shells for better understanding of the log output, since foreman will combine all of them.
-The `bin/dev` command will check if `foreman` is available, install it if needed and will run the application via `Procfile.dev`.
+You can run all required workers of OpenProject through `overmind`, which combines them in a single tab. Optionally, you may also
+run `overmind` as a daemon and connect to services individually.
+The `bin/dev` command will first check if `overmind` is available and run the application if via `Procfile.dev` if possible. If not,
+it falls back to `foreman`, installing it if needed.
```bash
bin/dev
```
The application will be available at `http://127.0.0.1:3000`. To customize bind address and port copy the `.env.example` provided in the root of this
-project as `.env` and [configure values](https://ddollar.github.io/foreman/#ENVIRONMENT) as required.
+project as `.env` and [configure values](https://github.com/DarthSim/overmind/tree/v2.4.0#overmind-environment) as required.
By default a worker process will also be started. In development asynchronous execution of long-running background tasks (sending emails, copying projects,
etc.) may be of limited use and it has known issues with regards to memory (see background worker section below). To disable the worker process:
-echo "concurrency: web=1,assets=1,worker=0" >> .foreman
+```bash
+echo "OVERMIND_IGNORED_PROCESSES=worker" >> .overmind.env
+```
-For more information refer to Foreman documentation section on [default options](https://ddollar.github.io/foreman/#DEFAULT-OPTIONS).
+For more information refer to the great Overmind documentation [usage section](https://github.com/DarthSim/overmind/tree/v2.4.0#usage).
You can access the application with the admin-account having the following credentials: