Skip to content

Commit 16d3039

Browse files
committed
Merge branch 'main' into iss_576-ee-webmaps
2 parents 1d70848 + afac6fd commit 16d3039

File tree

5 files changed

+109
-22
lines changed

5 files changed

+109
-22
lines changed

scripts/wordlist.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ QField
121121
QFieldCloud
122122
QFieldSync
123123
QGIS
124+
qgis
124125
QString
125126
QgsField
126127
Qt
@@ -194,6 +195,7 @@ frontend
194195
gdal
195196
geo
196197
geoid
198+
github
197199
gpkg
198200
hotline
199201
html
@@ -283,6 +285,7 @@ xcf
283285
xyz
284286
yml
285287
webmaps
288+
WebMaps
286289
webp
287290
workspaces
288291
www

src/server/environment/index.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Configure environment
22

3-
There are several application settings which can be changed via <GitHubRepo desc="config variables" id="MerginMaps/server/blob/master/.prod.env" />. Some of them have defaults and some of them need to be modified, particularly those with required placeholders (marked with ⭐️ below).
3+
There are several application settings which can be changed via <GitHubRepo desc="enterprise edition config variables" id="MerginMaps/server/blob/master/deployment/enterprise/.env.template" /> or <GitHubRepo desc="community edition config variables" id="MerginMaps/server/blob/master/deployment/enterprise/.env.template" />. Some of them have defaults and some of them need to be modified, particularly those with required placeholders (marked with ⭐️ below).
44
55
#### Server basics
66
Variables marked with star ⭐️ need to be modified for production use.
@@ -116,15 +116,21 @@ Other settings related to data management.
116116
| `DELETED_PROJECT_EXPIRATION` | integer | `7` | Lifetime in days for deleted projects. Expired projects are removed permanently without possibility to restore afterwards. |
117117
| `PROJECT_ACCESS_REQUEST` | integer | `604800` | Lifetime of active project access request in seconds. |
118118
| `TEMP_EXPIRATION` | integer | `7` | Time in days after files in a temporary folder are permanently deleted. |
119-
119+
120120

121121
#### Celery asynchronous tasks
122122
Mergin Maps is using Celery and Redis to perform asynchronous tasks or doing regular jobs.
123123

124-
| Variable name | Type | Default | Description |
125-
|-------------------------------|---------|-----------------------------------|-------------|
126-
| `BROKER_URL` ⭐️ | string | `redis://merginmaps-redis:6379/0` | Connection details to celery message broker. If non-default, it should match definition in `docker-compose` file. |
127-
| `CELERY_RESULT_BACKEND` | string | `redis://merginmaps-redis:6379/0` | Connection details to celery result back-end broker. If non-default, it should match definition in `docker-compose` file. |
128-
| `CELERYD_CONCURRENCY` | integer | All CPU | Number of child processes. As rule of thumb do not use all available CPUs. |
129-
| `CELERYD_PREFETCH_MULTIPLIER` | integer | 4 | The number of messages to prefetch at a time multiplied by the number of concurrent processes. Default is `4`. If you want to disable this feature set it to `1`. |
130-
| `CELERY_ACKS_LATE` | boolean | False | If `True`, means tasks will be transmitted as execute, AFTER they are finished, not 'right before'. |
124+
| Variable name | Type | Default | Description |
125+
|-----------------------|------|---------------------------------|-------------|
126+
|`BROKER_URL` |string|`redis://merginmaps-redis:6379/0`| Connection details to celery message broker. If non-default, it should match definition in `docker-compose` file. |
127+
|`CELERY_RESULT_BACKEND`|string|`redis://merginmaps-redis:6379/0`| Connection details to celery result back-end broker. If non-default, it should match definition in `docker-compose` file. |
128+
129+
#### WebMaps
130+
<ServerType type="EE" />
131+
132+
| Variable name | Type | Default | Description |
133+
|--------------------------|----------|-------------------------------|--------------------------------|
134+
| `MAPS_ENABLED` | boolean | `true` | Flag to enable webmaps |
135+
| `VECTOR_TILES_URL` | string | `https://tiles-ee.merginmaps.com/data/default/{z}/{x}/{y}.pbf` | URL to vector tiles which are used as basemap layer in webmaps |
136+
| `VECTOR_TILES_STYLE_URL` | string | `https://tiles-ee.merginmaps.com/styles/default.json` | URL to vector tiles style |

src/server/install/index.md

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,48 @@ Afterwards, you can follow [this guide](./ee/) to retrieve your <EnterprisePlatf
2626

2727
::: warning Enable <MainPlatformName /> Telemetry
2828
Make sure you follow deployment guidelines to <b>ensure any firewalls in your infrastructure are configured to allow the [`call-home`](../administer/#telemetry-service) functionality to send usage data</b>.
29+
:::
2930

3031
## Deployment
3132

3233
Follow these steps to run a local <MainPlatformName /> instance.
3334

35+
Clone the <MainPlatformName /> github repository locally or download <GitHubRepo id="MerginMaps/server/blob/master/deployment/" desc="deployment folder" />.
36+
```bash
37+
$ git clone git@github.com:MerginMaps/server.git
38+
```
39+
40+
Locate yourself on the proper <MainPlatformName /> edition.
41+
```shell
42+
# For community edition
43+
cd deployment/community
44+
45+
# For enterprise edition
46+
cd deployment/enterprise
47+
```
48+
3449
### Start docker containers
3550

36-
Provided that `docker` and `docker-compose` are installed on your host, running <MainPlatformName /> stack should be as simple as running `docker-compose`. However, before doing that you would need to [configure](../environment/) your server setup via environment variables in <GitHubRepo desc=".prod.env" id="MerginMaps/server/blob/master/.prod.env" /> file.
51+
Provided that `docker` and `docker-compose` are installed on your host, running <MainPlatformName /> stack should be as simple as running `docker-compose`. However, before doing that you would need to [configure](../environment/) your server setup via environment variables in `.prod.env` file.
52+
If you have not created this file yet, please do so from the provided `.env.template` file provided.
53+
54+
```shell
55+
cp .env.template .prod.env
56+
```
3757

3858
Once configured, you can run:
3959
```shell
40-
$ mkdir -p projects # or wherever you set it to be
60+
# For community edition
4161
$ mkdir -p mergin_db # or wherever you set it to be
42-
$ sudo chown -R 901:999 ./projects/
43-
$ sudo chmod g+s ./projects/
44-
$ docker-compose -f docker-compose.yml up
62+
$ sh ../common/set_permissions.sh projects
63+
$ docker-compose -f docker-compose.yml up -d
64+
65+
# For enterprise edition
66+
$ mkdir -p mergin-db-enterprise # or wherever you set it to be
67+
$ sh ../common/set_permissions.sh data
68+
$ sh ../common/set_permissions.sh map_data
69+
$ docker-compose -f docker-compose.yml up -d
70+
$ docker-compose -f docker-compose.maps.yml up -d # Run maps stack separately
4571
```
4672
​​
4773
### Initialise database

src/server/security/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Further security enhancements should be implemented by experts in accordance to
88
:::
99
For security and privacy reasons <MainPlatformName /> deployments should enable HTTPS secured connection via certificate file.
1010

11-
We provide a template configuration file <GitHubRepo id="MerginMaps/server/blob/master/ssl-proxy.conf" desc="ssl-proxy.conf" />as base for your configuration.
11+
We provide a template configuration file <GitHubRepo id="MerginMaps/server/blob/master/deployment/common/ssl-proxy.conf" desc="ssl-proxy.conf" />as base for your configuration.
1212

1313
Let's have a quick look at the main sections:
1414

src/server/upgrade/index.md

Lines changed: 59 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,56 @@ Make sure to always back up your database data before doing a migration.
1111
[[toc]]
1212

1313

14+
## Migration guide from 2025.2.x to 2025.3.x
15+
16+
<MigrationType type="EE" />
17+
18+
::: tip Changes on deployment behaviour
19+
Release 2025.3.x brings some changes on <MainPlatformName /> docker compose orchestration deployment procedure.
20+
:::
21+
22+
Get the latest <GitHubRepo id="MerginMaps/server/blob/master/deployment/enterprise/docker-compose.yml" desc="docker-compose file" /> or update docker images manually to version `2025.3.0`.
23+
Perform the migration:
24+
25+
1. Stop your running docker containers
26+
```bash
27+
$ docker compose -f docker-compose.yml down # or similarly, based on your previous deployment
28+
# INFO: After shutdown update the docker-compose.yml file to latest release
29+
```
30+
2. Please clone the <GitHubRepo id="MerginMaps/server/blob/master/" desc="server repository" /> or download <GitHubRepo id="MerginMaps/server/blob/master/deployment/" desc="deployment folder" />
31+
```bash
32+
$ cd server/deployment/enterprise
33+
```
34+
3. If you plan to use the new webmaps stacks, adapt your existing `.prod.env` and `docker-compose.yml` files. Move/copy them to the `enterprise` deployment folder
35+
```bash
36+
$ cp /some/path/.prod.env . # assuming you are located in `server/deployment/enterprise`
37+
$ cp /some/path/docker-compose.yml . # assuming you are located in `server/deployment/enterprise`
38+
```
39+
4. Start up your docker containers
40+
```bash
41+
$ docker compose -f docker-compose.yml -d up # or similarly, based on your deployment
42+
$ docker compose -f docker-compose.maps.yml -d up # If you want to deploy webmaps stack
43+
```
44+
5. Check that you are on correct versions (`ba5051218de4`, `ba5ae5972c4a`).
45+
```bash
46+
$ docker exec merginmaps-server flask db current
47+
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
48+
INFO [alembic.runtime.migration] Will assume transactional DDL.
49+
ba5051218de4 (head)
50+
ba5ae5972c4a (head)
51+
```
52+
53+
- If you do not see the version numbers at all, run the following commands:
54+
```bash
55+
$ docker exec merginmaps-server flask db stamp ba5051218de4
56+
$ docker exec merginmaps-server flask db stamp ba5ae5972c4a
57+
```
58+
6. Run the database migration:
59+
```bash
60+
$ docker exec merginmaps-server flask db upgrade community@5ad13be6f7ef
61+
$ docker exec merginmaps-server flask db upgrade enterprise@819e6b20ee93
62+
```
63+
1464
## Migration guide from 2024.2.x to 2025.2.x (CE)
1565

1666
::: tip Before you upgrade!
@@ -21,7 +71,7 @@ Previous individual `server` container is replaced by 3 service dedicated contai
2171

2272
<MigrationType type="CE" />
2373

24-
Get the latest <GitHubRepo id="MerginMaps/server/blob/master/docker-compose.yml" desc="docker-compose file" /> or update docker images manually to version `2025.2.2`.
74+
Get the latest <GitHubRepo id="MerginMaps/server/blob/master/deployment/community/docker-compose.yml" desc="docker-compose file" /> or update docker images manually to version `2025.2.2`.
2575
Perform the migration:
2676

2777
1. Stop your running docker containers
@@ -34,6 +84,7 @@ Perform the migration:
3484
```bash
3585
SECURITY_EMAIL_SALT='<YOUR STRONG HASH>'
3686
SECURITY_BEARER_SALT='<YOUR STRONG HASH>'
87+
PORT=5000
3788
```
3889

3990
3. Start up your docker containers
@@ -80,7 +131,7 @@ Previous individual `server` container is replaced by 3 service dedicated contai
80131

81132
<MigrationType type="EE" />
82133

83-
Get the latest <GitHubRepo id="MerginMaps/server/blob/master/docker-compose.yml" desc="docker-compose file" /> or update docker images manually to version `2025.2.0`.
134+
Get the latest <GitHubRepo id="MerginMaps/server/blob/master/deployment/enterprise/docker-compose.yml" desc="docker-compose file" /> or update docker images manually to version `2025.2.0`.
84135
Perform the migration:
85136

86137
1. Stop your running docker containers and build the new images
@@ -93,6 +144,7 @@ Perform the migration:
93144
```bash
94145
SECURITY_EMAIL_SALT='<YOUR STRONG HASH>'
95146
SECURITY_BEARER_SALT='<YOUR STRONG HASH>'
147+
PORT=5000
96148
```
97149

98150
3. Start up your docker containers
@@ -131,7 +183,7 @@ Perform the migration:
131183

132184
## Migration guide from 2024.3.x to 2024.4.x
133185

134-
Get the latest <GitHubRepo id="MerginMaps/server/blob/master/docker-compose.yml" desc="docker-compose file" /> or update docker images manually to version `2024.4.0`.
186+
Get the latest <GitHubRepo id="MerginMaps/server/blob/master/deployment/enterprise/docker-compose.yml" desc="docker-compose file" /> or update docker images manually to version `2024.4.0`.
135187
Perform the migration:
136188

137189
<MigrationType type="EE" />
@@ -163,7 +215,7 @@ Perform the migration:
163215

164216
## Migration guide from 2024.2.x to 2024.3.x
165217

166-
Get the latest <GitHubRepo id="MerginMaps/server/blob/master/docker-compose.yml" desc="docker-compose file" /> or update docker images manually to version `2024.3.0`.
218+
Get the latest <GitHubRepo id="MerginMaps/server/blob/master/deployment/enterprise/docker-compose.yml" desc="docker-compose file" /> or update docker images manually to version `2024.3.0`.
167219
Perform the migration:
168220

169221
<MigrationType type="EE" />
@@ -194,7 +246,7 @@ Perform the migration:
194246

195247
## Migration guide from 2023.6.1 to 2024.2.x (CE)
196248

197-
Get the latest <GitHubRepo id="MerginMaps/server/blob/master/docker-compose.yml" desc="docker-compose file" /> or update docker images manually.
249+
Get the latest <GitHubRepo id="MerginMaps/server/blob/master/deployment/community/docker-compose.yml" desc="docker-compose file" /> or update docker images manually.
198250

199251
<MigrationType type="CE" />
200252
Update image to `2024.2.2` and perform the migration:
@@ -259,7 +311,7 @@ Update image to `2024.2.1` and perform the migration:
259311

260312
-----
261313

262-
Get the latest <GitHubRepo id="MerginMaps/server/blob/master/docker-compose.yml" desc="docker-compose file" /> or update docker images manually to version `2023.6.1`.
314+
Get the latest <GitHubRepo id="MerginMaps/server/blob/master/deployment/community/docker-compose.yml" desc="docker-compose file" /> or update docker images manually to version `2023.6.1`.
263315
Perform the migration:
264316

265317
<MigrationType type="CE" />
@@ -343,7 +395,7 @@ $ docker-compose -f docker-compose.yml stop
343395
$ git pull
344396
```
345397

346-
6. Set environment variables (<GitHubRepo desc=".prod.env" id="MerginMaps/server/blob/master/.prod.env" /> file). **Important** ⚠️
398+
6. Set environment variables `.prod.env`. **Important** ⚠️
347399

348400
<MigrationType type="CE" />
349401

0 commit comments

Comments
 (0)