Provide info on how to spawn shell for docker

[ci skip]
pull/8387/head
Oliver Günther 5 years ago
parent 2f026276c3
commit ef4017cca6
No known key found for this signature in database
GPG Key ID: A3A8BDAD7C0C552C
  1. 59
      docs/installation-and-operations/operation/control/README.md
  2. 3
      docs/system-admin-guide/authentication/openid-providers/README.md
  3. 3
      docs/system-admin-guide/authentication/saml/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"
```

@ -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

@ -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

Loading…
Cancel
Save