From ef4017cca69f593bbf0613b9b96a5f28de7f9114 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Mon, 25 May 2020 10:54:39 +0200 Subject: [PATCH] Provide info on how to spawn shell for docker [ci skip] --- .../operation/control/README.md | 59 +++++++++++++++++-- .../authentication/openid-providers/README.md | 3 + .../authentication/saml/README.md | 3 + 3 files changed, 61 insertions(+), 4 deletions(-) diff --git a/docs/installation-and-operations/operation/control/README.md b/docs/installation-and-operations/operation/control/README.md index 51de7e4464..346410b30a 100644 --- a/docs/installation-and-operations/operation/control/README.md +++ b/docs/installation-and-operations/operation/control/README.md @@ -6,15 +6,21 @@ sidebar_navigation: # Process control for your OpenProject installation -Note: this guide is specific to the package-based installation. -## Restart all the OpenProject processes + + + +## Packaged installation + +#### Restart all the OpenProject processes ```bash sudo openproject restart ``` -## Run commands like rake tasks or rails console + + +#### Run commands like rake tasks or rails console The OpenProject command line tool supports running rake tasks and known scripts. For instance: @@ -42,7 +48,9 @@ Check the version of Ruby used by OpenProject: sudo openproject run ruby -v ``` -## Scaling the number of web workers + + +#### Scaling the number of web workers Note: Depending on your free RAM on your system, we recommend you raise the default number of web processes. The default from 9.0.3 onwards is 4 web processes. Each worker will take roughly 300-400MB RAM. @@ -65,3 +73,46 @@ After changing these values, simply restart the web process: ```bash sudo openproject restart web ``` + + + +## Docker-based installation + +#### Run commands like rake tasks or rails console + +You can spawn an interactive shell in your docker container to run commands in the OpenProject environment. + + + +First, find out the container ID of your web process with: + +```bash +# Ensure the containers are running with the following output +docker ps | gre web_1 + +# save the container ID as a env variable $CID +export CID=$(docker ps | grep web_1 | cut -d' ' -f 1) +``` + + + +We can now run commands against that container + +Run a bash shell in the container + +```bash +docker exec -it $CIT bash +``` + +Get the current version of OpenProject + +```bash +docker exec -it $CIT bash -c "RAILS_ENV=production rails version" +``` + +Launch an interactive console to directly interact with the underlying Ruby on Rails application: + +```bash +docker exec -it $CIT bash -c "RAILS_ENV=production rails console" +``` + diff --git a/docs/system-admin-guide/authentication/openid-providers/README.md b/docs/system-admin-guide/authentication/openid-providers/README.md index 43e5236e53..8a782d6902 100644 --- a/docs/system-admin-guide/authentication/openid-providers/README.md +++ b/docs/system-admin-guide/authentication/openid-providers/README.md @@ -98,6 +98,9 @@ Q: After clicking on a provider badge, I am redirected to a signup form that say A: This can happen if you previously created user accounts in OpenProject with the same email than what is stored in the OpenID provider. In this case, if you want to allow existing users to be automatically remapped to the OpenID provider, you should do the following: +Spawn an interactive console in OpenProject. The following example shows the command for the packaged installation. +See [our process control guide](https://docs.openproject.org/installation-and-operations/operation/control/) for information on other installation types. + ``` sudo openproject run console > Setting.oauth_allow_remapping_of_existing_users = true diff --git a/docs/system-admin-guide/authentication/saml/README.md b/docs/system-admin-guide/authentication/saml/README.md index ffb81a41b1..bf0b2f3726 100644 --- a/docs/system-admin-guide/authentication/saml/README.md +++ b/docs/system-admin-guide/authentication/saml/README.md @@ -193,6 +193,9 @@ Q: After clicking on a provider badge, I am redirected to a signup form that say A: This can happen if you previously created user accounts in OpenProject with the same email than what is stored in the identity provider. In this case, if you want to allow existing users to be automatically remapped to the SAML identity provider, you should do the following: +Spawn an interactive console in OpenProject. The following example shows the command for the packaged installation. +See [our process control guide](https://docs.openproject.org/installation-and-operations/operation/control/) for information on other installation types. + ``` sudo openproject run console > Setting.oauth_allow_remapping_of_existing_users = true