-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#822 Docker & Docker Compose installation
- Loading branch information
1 parent
87777b2
commit 2de4b02
Showing
6 changed files
with
100 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
/generated | ||
*.png | ||
*.svg |
3 changes: 3 additions & 0 deletions
3
ontrack-docs/src/docs/asciidoc/installation-dependencies.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[[installation-dependencies]] | ||
=== Installation dependencies | ||
|
43 changes: 43 additions & 0 deletions
43
ontrack-docs/src/docs/asciidoc/installation-docker-compose.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[[installation-docker-compose]] | ||
=== Docker Compose installation | ||
|
||
The fastest way to start Ontrack is to use Docker Compose, but it might not be | ||
the best way to run it in production. | ||
|
||
The Docker Compose file can be downloaded from: | ||
|
||
https://github.com/nemerosa/ontrack/blob/{ontrack-version}/compose/docker-compose.yml | ||
|
||
You can simply run it using: | ||
|
||
[source,bash] | ||
---- | ||
docker-compose up -d | ||
---- | ||
|
||
This starts three services: | ||
|
||
* Ontrack itself at http://localhost:8080 | ||
* a Postgres database | ||
* an Elasticsearch single node | ||
|
||
Neither Postgres or Elasticsearch are exposed by default, but you can of course | ||
edit the Docker Compose file at your convenience. | ||
|
||
The version of Ontrack is set by default to `4` (latest 4.x version) but | ||
you can override it using the `ONTRACK_VERSION` environment variable. | ||
|
||
The memory settings and other JVM parameters for Ontrack can be passed | ||
using the `JAVA_OPTIONS` environment variable, which defaults to | ||
`-Xms1024m -Xmx1024m`. | ||
|
||
Other <<configuration-properties,Ontrack configuration properties>> must be passed | ||
through environment variables. | ||
|
||
Three named Docker volumes are created for the data to be persisted: | ||
|
||
* `ontrack_postgres` | ||
* `ontrack_elasticsearch` | ||
* `ontrack_data` | ||
|
||
For other volume configuration, please edit the Docker Compose file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
[[installation-docker]] | ||
=== Docker installation | ||
|
||
The Ontrack Docker image is available in the Docker Hub | ||
at https://hub.docker.com/r/nemerosa/ontrack. | ||
|
||
Each specific version is available and also a "latest" version per major and minor | ||
version. For example: | ||
|
||
* 4 | ||
* 4.0 | ||
* 4.0.0 | ||
|
||
To run Ontrack, you need to make sure that the minimal <<installation-dependencies,dependencies>> are available: | ||
|
||
* Postgres | ||
* Elasticsearch | ||
|
||
NOTE: See <<installation-dependencies>> for details. | ||
|
||
You can then run Ontrack using: | ||
|
||
[source,bash] | ||
---- | ||
docker container run \ | ||
--detach \ | ||
--publish 8080:8080 \ | ||
-e SPRING_DATASOURCE_URL=<Postgres Ontrack DB JDBC URL> \ | ||
-e SPRING_DATASOURCE_USERNAME=<Postgres Ontrack DB Username> \ | ||
-e SPRING_DATASOURCE_PASSWORD=<Postgres Ontrack DB Password> \ | ||
-e SPRING_ELASTICSEARCH_REST_URIS=<Elasticsearch URL> \ | ||
nemerosa/ontrack:4 | ||
---- | ||
|
||
The memory settings and other JVM parameters for Ontrack can be passed | ||
using the `JAVA_OPTIONS` environment variable. | ||
|
||
Other <<configuration-properties,Ontrack configuration properties>> must be passed | ||
through environment variables. | ||
|
||
Optionally, a volume can be mapped to the Ontrack `/var/ontrack/data` Docker | ||
volume. This is particularly needed when using a secret storage based on the | ||
file system (see <<setup>>). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters