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

Remove passenger, fix a few things

Cyril Rohr85e7f05b8e62
diff --git a/Dockerfile b/Dockerfile
index 6fb077bf9a8..53d637d382c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -23,12 +23,11 @@ ENV PGDATA=/var/openproject/pgdata
ENV PGDATA_LEGACY=/var/lib/postgresql/9.6/main
ENV DATABASE_URL=postgres://openproject:[email protected]/openproject
-ENV RAILS_SERVE_STATIC_FILES=1
-ENV HEROKU=true
ENV RAILS_ENV=production
ENV RAILS_CACHE_STORE=memcache
-ENV RAILS_GROUPS=production,docker,opf_plugins
+ENV RAILS_GROUPS=production
ENV RAILS_LOG_TO_STDOUT=1
+ENV RAILS_SERVE_STATIC_FILES=1
ENV OPENPROJECT_INSTALLATION__TYPE=docker
# Valid values are: standard,bim
ENV OPENPROJECT_EDITION=standard
diff --git a/Gemfile b/Gemfile
index 1b37b10cd47..dfc93de4120 100644
--- a/Gemfile
+++ b/Gemfile
@@ -321,11 +321,6 @@ gem 'openproject-translations',
gem 'newrelic_rpm', '~> 6.9.0.363'
-# remove once we no longer use passenger
-group :docker, optional: true do
- gem 'passenger', '~> 6.0.1'
-end
-
# Load Gemfile.local, Gemfile.plugins, plugins', and custom Gemfiles
gemfiles = Dir.glob File.expand_path('../{Gemfile.plugins,Gemfile.modules,Gemfile.local,lib/plugins/*/Gemfile}',
__FILE__)
diff --git a/Gemfile.lock b/Gemfile.lock
index 6ccbf074c09..c2ed4f86abf 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -658,9 +658,6 @@ GEM
parallel
parser (2.7.1.5)
ast (~> 2.4.1)
- passenger (6.0.6)
- rack
- rake (>= 0.8.1)
pdf-core (0.8.1)
pdf-inspector (1.3.0)
pdf-reader (>= 1.0, < 3.0.a)
@@ -1059,7 +1056,6 @@ DEPENDENCIES
openproject-xls_export!
overviews!
parallel_tests (~> 3.1, < 3.3.0)
- passenger (~> 6.0.1)
pg (~> 1.2.2)
plaintext (~> 0.3.2)
posix-spawn (~> 0.3.13)
diff --git a/docker-compose.pullpreview.yml b/docker-compose.pullpreview.yml
index a6b33490061..f58682fa14f 100644
--- a/docker-compose.pullpreview.yml
+++ b/docker-compose.pullpreview.yml
@@ -18,7 +18,6 @@ web:
- "DATABASE_URL=postgresql://app:p4ssw0rd@db:5432/app?encoding=utf8&pool=5&timeout=5000&reconnect=true"
- "SECRET_KEY_BASE=d4e74f017910ac56c6ebad01165b7e1b37f4c9c02e9716836f8670cdc8d65a231e64e4f6416b19c8"
- "RAILS_ENV=production"
- - "HEROKU=true"
env_file: ./.env.pullpreview
ports:
- "80:8080"
@@ -35,7 +34,6 @@ worker:
- "DATABASE_URL=postgresql://app:p4ssw0rd@db:5432/app?encoding=utf8&pool=5&timeout=5000&reconnect=true"
- "SECRET_KEY_BASE=d4e74f017910ac56c6ebad01165b7e1b37f4c9c02e9716836f8670cdc8d65a231e64e4f6416b19c8"
- "RAILS_ENV=production"
- - "HEROKU=true"
env_file: ./.env.pullpreview
command: "./docker/worker --seed --set attachment_max_size=262144,host_name=${PULLPREVIEW_PUBLIC_DNS}"
volumes_from:
diff --git a/docker/web b/docker/web
index 1482aceb6f1..92d70da0170 100755
--- a/docker/web
+++ b/docker/web
@@ -4,17 +4,11 @@ BIND="${BIND:=0.0.0.0}"
PORT="${PORT:=8080}"
RAILS_ENV="${RAILS_ENV:="development"}"
MIGRATE="${MIGRATE:="false"}"
-MIN_INSTANCES="${PASSENGER_MIN_INSTANCES:=1}"
-MAX_INSTANCES="${PASSENGER_MAX_INSTANCES:=3}"
-SPAWN_METHOD="${PASSENGER_SPAWN_METHOD:=smart}"
-USE_PUMA="${USE_PUMA:="false"}"
-
-if [ "$RAILS_ENV" = "production" ] && [ "$USE_PUMA" = "true" ]; then
+if [ "$RAILS_ENV" = "production" ] ; then
# @TODO Add apache config to serve the assets. Until then we have Puma serve
# them which is slower. This is ok if an asset host is used (SaaS).
# But for self-hosted installations we may want to fix that.
- # Passenger does include a config to have nginx serve the assets.
export OPENPROJECT_ENABLE__INTERNAL__ASSETS__SERVER=true
fi
@@ -23,15 +17,5 @@ if [ "$MIGRATE" = "true" ]; then
bundle exec rake db:migrate
fi
-if [ "$USE_PUMA" = "true" ]; then
- # see `config/puma.rb` for configuration
- bundle exec rails server puma -b $BIND -p $PORT
-else
- exec bundle exec passenger start \
- -p $PORT \
- -a "${BIND}" \
- --min-instances "$MIN_INSTANCES" \
- --max-pool-size "$MAX_INSTANCES" \
- --spawn-method "$SPAWN_METHOD" \
- --max-preloader-idle-time 0
-fi
+# see `config/puma.rb` for configuration
+exec bundle exec rails server -u puma -b $BIND -p $PORT