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

Provide info on how to spawn shell for docker

Oliver Güntheref4017cca69f
diff --git a/docs/installation-and-operations/operation/control/README.md b/docs/installation-and-operations/operation/control/README.md
index 51de7e44644..346410b30ab 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 43e5236e53a..8a782d69024 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 ffb81a41b14..bf0b2f37260 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