diff options
author | michaelbirnstiehl <michael.birnstiehl@sonarsource.com> | 2020-09-28 16:55:35 -0500 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2020-09-30 20:07:46 +0000 |
commit | af994fd94c7e438a41b2fcf562a3f6144f320a8b (patch) | |
tree | 09f7612a43be597b17cf287b6eccda1753a0b52d /server/sonar-docs/src/pages/setup/install-server.md | |
parent | 6a1ecd978e61061134fd53843096579c323add5a (diff) | |
download | sonarqube-af994fd94c7e438a41b2fcf562a3f6144f320a8b.tar.gz sonarqube-af994fd94c7e438a41b2fcf562a3f6144f320a8b.zip |
SONAR-13892 Add Docker compose yml file to install docs
Diffstat (limited to 'server/sonar-docs/src/pages/setup/install-server.md')
-rw-r--r-- | server/sonar-docs/src/pages/setup/install-server.md | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/server/sonar-docs/src/pages/setup/install-server.md b/server/sonar-docs/src/pages/setup/install-server.md index 1bf6d9b19bc..a887b244980 100644 --- a/server/sonar-docs/src/pages/setup/install-server.md +++ b/server/sonar-docs/src/pages/setup/install-server.md @@ -187,11 +187,11 @@ Follow these steps for your first installation: Create the volumes with the following commands: ```bash $> docker volume create --name sonarqube_data - $> docker volume create --name sonarqube_extensions $> docker volume create --name sonarqube_logs + $> docker volume create --name sonarqube_extensions ``` [[warning]] - | Make sure you're using [volumes](https://docs.docker.com/storage/volumes/) as shown with the above commands, and not [bind mounts](https://docs.docker.com/storage/bind-mounts/). Using bind mounts prevents plugins and languages from populating correctly. + | Make sure you're using [volumes](https://docs.docker.com/storage/volumes/) as shown with the above commands, and not [bind mounts](https://docs.docker.com/storage/bind-mounts/). Using bind mounts prevents plugins from populating correctly. 2. Drivers for supported databases (except Oracle) are already provided. If you're using an Oracle database, you need to add the JDBC driver to the `sonar_extensions` volume. To do this: @@ -227,6 +227,49 @@ Follow these steps for your first installation: [[warning]] | Use of the environment variables `SONARQUBE_JDBC_USERNAME`, `SONARQUBE_JDBC_PASSWORD`, and `SONARQUBE_JDBC_URL` is deprecated and will stop working in future releases. +####**Example Docker Compose configuration** +If you're using [Docker Compose](https://docs.docker.com/compose/), use the following example as a reference when configuring your `.yml` file. Click the heading below to expand the `.yml` file. + +[[collapse]] +| ## Docker Compose .yml file example +| +| ``` +| version: "3" +| +| services: +| sonarqube: +| image: sonarqube:8-community +| depends_on: +| - db +| environment: +| SONAR_JDBC_URL: jdbc:postgresql://db:5432/sonar +| SONAR_JDBC_USERNAME: sonar +| SONAR_JDBC_PASSWORD: sonar +| volumes: +| - sonarqube_data:/opt/sonarqube/data +| - sonarqube_extensions:/opt/sonarqube/extensions +| - sonarqube_logs:/opt/sonarqube/logs +| - sonarqube_temp:/opt/sonarqube/temp +| ports: +| - "9000:9000" +| db: +| image: postgres:12 +| environment: +| POSTGRES_USER: sonar +| POSTGRES_PASSWORD: sonar +| volumes: +| - postgresql:/var/lib/postgresql +| - postgresql_data:/var/lib/postgresql/data +| +| volumes: +| sonarqube_data: +| sonarqube_extensions: +| sonarqube_logs: +| sonarqube_temp: +| postgresql: +| postgresql_data: +| ``` + ### SonarQube 7.9.x LTS Follow these steps for your first installation: |