Skip to content

Commit

Permalink
Documentation: improve instructions for scaling configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jwkaltz committed Sep 12, 2024
1 parent 2fcdebf commit 1db03bd
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions docs/src/main/resources/templates/scaling.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ <h4 id="scaling_solus">
<a class="headerlink" href="#scaling_solus" title="Permalink to this headline"></a>
</h4>
<p>
To store the state we use a PostgreSQL database, the database connection should be configured with the
following Java system properties:
MapFish-Print's horizontal scaling solution is based on storing states in a PostgreSQL database. To enable
this mode, the file <code>mapfish-spring-application-context-override-db.xml</code> must be copied to
<code>mapfish-spring-application-context-override.xml</code> and database connection parameters must be
configured (see below).
</p>
<p>The database connection must be configured with the following Java system properties:</p>

<ul>
<li><code>db.host</code>: The database server host name</li>
Expand All @@ -25,12 +28,11 @@ <h4 id="scaling_solus">
</ul>

<p>
The schema should exist, and the necessary tables are created automatically (<code>print_accountings</code>,
<code>print_job_results</code>, <code>print_job_statuses</code>). In this mode, the container will wait for
the database to be reachable before actually starting the tomcat server.
The schema must exist, and the necessary tables are created automatically (<code>print_accountings</code>,
<code>print_job_results</code>, <code>print_job_statuses</code>)
</p>

<p>The DB polling can be tuned with these two environment variables:</p>
<p>Database polling can be tuned with these two environment variables:</p>
<ul>
<li>
<code>PRINT_CANCEL_OLD_POLL_INTERVAL</code>: How often in seconds the DB is polled for jobs to be canceled
Expand All @@ -43,6 +45,18 @@ <h4 id="scaling_solus">
</li>
</ul>

<h5 ud="docker_image">
Existing MapFish-Print Packages
<a class="headerlink" href="#docker_image" title="Permalink to this headline"></a>
</h5>
<p>
Existing MapFish-Print distribution packages may already contain functionality to ease the setup of
horizontal scaling. For example, if you use the Docker image
https://hub.docker.com/r/camptocamp/mapfish_print), you do not need to manually rename the file mentioned
above, and a startup script contains functionality to verify database availability before the application
server is started.
</p>

<h5 id="scaling_docker">
Docker
<a class="headerlink" href="#scaling_docker" title="Permalink to this headline"></a>
Expand Down

0 comments on commit 1db03bd

Please sign in to comment.