You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/dev/mergince.md
+113-3Lines changed: 113 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,116 @@ If you need more functionality than <MainPlatformName /> CE offers, explore our
12
12
## How to deploy Mergin Maps CE
13
13
**Interested in deploying <MainPlatformName /> CE?** You can start by going to <GitHubRepoid="MerginMaps/mergin" /> on GitHub and read instructions on how to deploy it for your platform.
14
14
15
+
:::tip
16
+
Follow our [Migration Guides](./ce-migration/) to migrate from older versions to the latest version of <MainPlatformName /> CE.
17
+
:::
18
+
19
+
### Start docker containers
20
+
Provided that `docker` and `docker-compose` are installed on your host, running Mergin Maps stack should be as simple as running `docker-compose`. However, before doing that you would need to [configure](#configure) your server setup via environment variables in <GitHubRepodesc=".prod.env"id="MerginMaps/mergin/blob/master/.prod.env" /> file.
21
+
22
+
Once configured, you can run:
23
+
```shell
24
+
$ mkdir -p projects # or wherever you set it to be
25
+
$ sudo chown -R 901:999 ./projects/
26
+
$ sudo chmod g+s ./projects/
27
+
$ docker-compose -f docker-compose.yml up
28
+
```
29
+
30
+
### Initialise
31
+
If server is started for the first time, database needs to be initialised and super-user created (set admin username, password and email):
There are several application settings which can be changed via <GitHubRepodesc="config variables"id="MerginMaps/mergin/blob/master/.prod.env" />. Some of them have defaults and some of them needs to be modified, particularly those with `fixme` placeholder (marked with asterisks below).
39
+
40
+
#### Server basics
41
+
Settings about your deployment. Variables marked with star ⭐️ need to be modified.
|`DB_APPLICATION_NAME`| string |`mergin`| Comment in database connection string to better identify connection source. |
68
+
|`DB_DATABASE`| string |`postgres`| Database to store <MainPlatformName /> tables. |
69
+
|`DB_HOST`| string |`db`| Database host. Mapped to docker-compose service name. |
70
+
|`DB_PORT`| integer |`5432`| Database port. If non-default should match port exposed in docker-compose file. |
71
+
|`DB_USER`⭐️ | string |`postgres`| PostgreSQL user to connect to <MainPlatformName /> database. |
72
+
|`DB_PASSWORD`⭐️ | string |`postgres`| PostgreSQL user password. |
73
+
|`DB_POOL_MAX_OVERFLOW=10`| integer |`10`| Database `max_overflow` limit for [SQLAlchemy](https://docs.sqlalchemy.org/en/14/core/engines.html). |
74
+
|`DB_POOL_SIZE`| integer |`2`| Database pool size for SQLAlchemy. With overflow determines maximum of concurrent connections to database. |
75
+
|`DB_POOL_TIMEOUT`| integer |`300`| Database pool timeout for SQLAlchemy. |
76
+
77
+
#### Sending Emails
78
+
Mergin Maps can connect to SMTP server to send notifications. Also required for password recovery to work. Variables marked with star ⭐️ need to be modified.
|`GLOBAL_WORKSPACE`⭐️ | string |`mergin`| Namespace (part of URL) for all projects. All projects belong to this single workspace with certain permissions (see below). |
98
+
|`GLOBAL_READ`| Boolean |`true`| All registered users have read access to all projects. If false, application admin would need to grant project access to users manually. |
99
+
|`GLOBAL_WRITE`| Boolean |`false`| All registered users have write access (can sync) to all projects. |
100
+
|`GLOBAL_ADMIN`| Boolean |`false`| All registered users can create/delete projects. |
101
+
|`GLOBAL_STORAGE`⭐️ | integer |`10737418240`| Storage limit Mergin Maps can use to store projects (last version) in bytes (default is 10 GB). Should be reasonably large. |
102
+
|`LOCAL_PROJECTS`| string |`/data/live`| Directory to store projects on container. Please refer to volume mapping in docker-compose file. |
103
+
|`TEMP_DIR`| string |`/data/tmp`| Trash directory for temp files being cleaned regularly. Please refer to volume mapping in docker-compose file. |
104
+
|`MAINTENANCE_FILE`| string |`/data/MAINTENANCE`| File to indicate server is in maintenance - read only mode. Please refer to volume mapping in docker-compose file. |
105
+
|`BLACKLIST`| string |`.mergin/`, `.DS_Store`, `.directory`| Pattern to ignore when syncing files. |
106
+
|`FILE_EXPIRATION`| integer |`172800`| When GeoPackage file was updated with "<NoSpellcheckid="diffable" />" change, original data are being removed (as they can be reconstructed on demand) to save disk space. File lifetime in seconds. |
107
+
|`LOCKFILE_EXPIRATION`| integer |`300`| Time in seconds for project being locked while updated. If no change happens to project in such time, lockfile is removed. |
108
+
|`MAX_CHUNK_SIZE`| integer |`10485760`| Maximum size of file chunk to be uploaded (and received by server) in bytes. |
109
+
|`MAX_DOWNLOAD_ARCHIVE_SIZE`| integer |`1073741824`| Maximum size of project zip archive in bytes for direct download. Too large projects may take too long to download or never complete in one request. |
110
+
|`USE_X_ACCEL`⭐️ | Boolean |`false`| Whether to use nginx do serve files. Should be enabled if used with nginx proxy for performance reasons. Read more [here](https://www.nginx.com/resources/wiki/start/topics/examples/x-accel/). |
111
+
|`CLOSED_ACCOUNT_EXPIRATION`| integer |`1`| Time in days after user closed his account to all projects and files are permanently deleted. Please note than until user is removed username/email is occupied. |
112
+
|`DELETED_PROJECT_EXPIRATION`| integer|`7`| Lifetime in days for deleted project. Expired projects are removed permanently without possibility to restore afterwards. |
113
+
|`PROJECT_ACCESS_REQUEST`| integer |`604800`| Lifetime of active project access request in seconds. |
114
+
|`TEMP_EXPIRATION`| integer |`7`| Time in days after files in temporary folder are permanently deleted. |
115
+
116
+
#### Celery asynchronous tasks
117
+
Mergin Maps is using Celery and Redis to perform asynchronous tasks or doing regular jobs.
|`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. |
122
+
|`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. |
123
+
124
+
15
125
## How to opt out of sending statistics
16
126
<SinceBadgetype="Server"version="2023.2" />
17
127
By default, <MainPlatformName /> CE collects anonymous usage information to make the service better. There is a variable named `COLLECT_STATISTICS` that controls if statistics are collected and sent to <MainPlatformNameLink />.
@@ -21,7 +131,8 @@ If you do not want to provide these data, you can opt-out any time by setting th
21
131
COLLECT_STATISTICS=false
22
132
```
23
133
24
-
## Mergin Maps CE server is not properly configured
134
+
## Mergin Maps CE troubleshooting
135
+
### Mergin Maps CE server is not properly configured
25
136
Did you get an error that the server is not properly configured?
26
137

27
138
@@ -30,7 +141,6 @@ Did you get an error that the server is not properly configured?
30
141
31
142
2. Restart the container with the `MERGIN_BASE_URL` variable
32
143
33
-
## Migrate to the latest Mergin Maps CE version
34
-
To migrate from older <MainPlatformName /> Community Edition to the latest version, follow our [Migration Guides](./ce-migration/).
0 commit comments