mirror of
https://github.com/umap-project/umap.git
synced 2025-05-19 04:00:35 +02:00
Compare commits
10 commits
51273aa13f
...
f3daf73035
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f3daf73035 | ||
![]() |
c5467e42d5 | ||
![]() |
14c388b063 | ||
![]() |
e3c5acd52b | ||
![]() |
c044afb43d | ||
![]() |
cfef25748b | ||
![]() |
6c835622c0 | ||
![]() |
62e23ac49b | ||
![]() |
a78cdd227e | ||
![]() |
b08dc98bda |
4 changed files with 144 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
# Force rtfd to use a recent version of mkdocs
|
# Force rtfd to use a recent version of mkdocs
|
||||||
mkdocs==1.6.1
|
mkdocs==1.6.1
|
||||||
pymdown-extensions==10.14.3
|
pymdown-extensions==10.14.3
|
||||||
mkdocs-material==9.5.50
|
mkdocs-material==9.6.3
|
||||||
mkdocs-static-i18n==1.3.0
|
mkdocs-static-i18n==1.3.0
|
||||||
|
|
138
docs/deploy/synology.md
Normal file
138
docs/deploy/synology.md
Normal file
|
@ -0,0 +1,138 @@
|
||||||
|
# Synology
|
||||||
|
|
||||||
|
These instructions only serve as a start and based on DSM 7.2. The following pages serve as a basis and should be observed:
|
||||||
|
- https://docs.umap-project.org/en/master/deploy/docker/
|
||||||
|
- https://docs.umap-project.org/en/master/config/settings
|
||||||
|
|
||||||
|
## Preparation:
|
||||||
|
- create a key that will later be used as SECRET_KEY (= "a long and random secret key that must not be shared"
|
||||||
|
You can easily generate one with openssl at command line with: `openssl rand -base64 32`)
|
||||||
|
- Under which web address should uMap be called? It must be assigned to the environment variable SITE_URL and specified in the reverse proxy. In this description https://map.example.com is used
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
### 1. Paths:
|
||||||
|
Create the following folders in the FileStation (there may also be different paths, but these must also be adjusted in the configuration below):
|
||||||
|
`/volume1/docker/umap/POSTGRESQL_DATA`
|
||||||
|
`/volume1/docker/umap/STATIC_ROOT`
|
||||||
|
`/volume1/docker/umap/MEDIA_ROOT`
|
||||||
|
`/volume1/docker/umap/conf`
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
### 2. Config:
|
||||||
|
Create the configuration file and save it here (I recommend the DSM text editor from the package centre):
|
||||||
|
- /volume1/docker/umap/conf/umap.conf
|
||||||
|
<details>
|
||||||
|
<summary>example config (click) - you still need to customise them:</summary>
|
||||||
|
|
||||||
|
```
|
||||||
|
# ➜ https://docs.umap-project.org/en/master/config/settings
|
||||||
|
#[general]
|
||||||
|
# Site name
|
||||||
|
title = "My uMap"
|
||||||
|
# Site URL
|
||||||
|
site_url = "https://map.example.com/"
|
||||||
|
# Site description
|
||||||
|
description = "My uMap description"
|
||||||
|
# Site logo (optional)
|
||||||
|
logo = "/static/umap.png"
|
||||||
|
# Site favicon (optional)
|
||||||
|
# favicon = "/static/favicon.ico"
|
||||||
|
|
||||||
|
# Default language
|
||||||
|
language = "de"
|
||||||
|
# Default map center
|
||||||
|
default_latitude = "49.90305"
|
||||||
|
default_longitude = "15.77054"
|
||||||
|
default_zoom = "16"
|
||||||
|
# Map background
|
||||||
|
background_layer = "osm"
|
||||||
|
# Map tile server
|
||||||
|
tile_layer = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||||
|
# Map attribution
|
||||||
|
attribution = "© OpenStreetMap contributors"
|
||||||
|
SECRET_KEY = "1234"
|
||||||
|
#
|
||||||
|
# Do you want users to be able to create an account directly on your uMap instance (instead of only using OAuth).
|
||||||
|
# You need to create first a superuser, on the command line (open Terminal in Container Manager):
|
||||||
|
# > umap createsuperuser
|
||||||
|
# umapadmin
|
||||||
|
# umap@map.example.com
|
||||||
|
# YOURPASSWORD
|
||||||
|
#
|
||||||
|
ENABLE_ACCOUNT_LOGIN=1
|
||||||
|
#
|
||||||
|
# To log in as the first user, you must set the UMAP_REGISTRATION_OPEN option to True.
|
||||||
|
# This allows you to create a new account that is automatically considered a superuser.
|
||||||
|
# After you have registered, you can set the option to False again to prevent further registrations.
|
||||||
|
# Alternatively, you can also create a superuser account via the Django admin interface.
|
||||||
|
UMAP_REGISTRATION_OPEN = True
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
### 3. Reverse Proxy = (Direct your uMap domain to your uMap Docker container):
|
||||||
|
- '_Control Panel_' ➜ '_Login Portal_' ➜ Tab '_Advanced_' ➜ '_Reverse Proxy_' and adjust like this:
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
- Open the Firewall for Port 443
|
||||||
|
- forward Port 443 in your Router to your DiskStation
|
||||||
|
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
### 4. Container Manager (formerly package 'Docker'):
|
||||||
|
open '_Container Manager_' ➜ go to '_Project_' ➜ '_create_'
|
||||||
|
- define a project name
|
||||||
|
- select yout project path (/volume1/docker/umap/)
|
||||||
|
- select 'Create docker-compose.yaml' and paste this code into (adjust environment variables `SITE_URL`, `SECRET_KEY` and volume mounts [for db & app]):
|
||||||
|
|
||||||
|
```
|
||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: postgis/postgis:14-3.4-alpine
|
||||||
|
environment:
|
||||||
|
- POSTGRES_HOST_AUTH_METHOD=trust
|
||||||
|
volumes:
|
||||||
|
- /volume1/docker/umap/POSTGRESQL_DATA:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
app:
|
||||||
|
image: umap/umap:2.3.1
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
environment:
|
||||||
|
- DATABASE_URL=postgis://postgres@db/postgres
|
||||||
|
- SITE_URL=https://map.example.com/
|
||||||
|
- STATIC_ROOT=/srv/umap/static
|
||||||
|
- MEDIA_ROOT=/srv/umap/uploads
|
||||||
|
- SECRET_KEY=1234
|
||||||
|
volumes:
|
||||||
|
# # FIX the path on the left, below, to your location
|
||||||
|
- /volume1/docker/umap/conf/umap.conf:/etc/umap/umap.conf
|
||||||
|
- /volume1/docker/umap/STATIC_ROOT:/srv/umap/static
|
||||||
|
- /volume1/docker/umap/MEDIA_ROOT:/srv/umap/uploads
|
||||||
|
restart: always
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
```
|
||||||
|
- now 'create' your project
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
### 5. create superuser:
|
||||||
|
Do you want users to be able to create an account directly on your uMap instance (instead of only using OAuth).
|
||||||
|
You need to [create first a superuser](https://docs.umap-project.org/en/master/config/settings/#enable_account_login), on the command line (open Terminal in Container Manager):
|
||||||
|
```
|
||||||
|
umap createsuperuser
|
||||||
|
# umapadmin
|
||||||
|
# umap@map.example.com
|
||||||
|
# YOURPASSWORD
|
||||||
|
```
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Force rtfd to use a recent version of mkdocs
|
# Force rtfd to use a recent version of mkdocs
|
||||||
mkdocs==1.6.1
|
mkdocs==1.6.1
|
||||||
pymdown-extensions==10.14.3
|
pymdown-extensions==10.14.3
|
||||||
mkdocs-material==9.5.50
|
mkdocs-material==9.6.3
|
||||||
mkdocs-static-i18n==1.3.0
|
mkdocs-static-i18n==1.3.0
|
||||||
|
|
|
@ -28,7 +28,7 @@ classifiers = [
|
||||||
"Programming Language :: Python :: 3.12",
|
"Programming Language :: Python :: 3.12",
|
||||||
]
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"Django==5.1.5",
|
"Django==5.1.6",
|
||||||
"django-agnocomplete==2.2.0",
|
"django-agnocomplete==2.2.0",
|
||||||
"django-environ==0.12.0",
|
"django-environ==0.12.0",
|
||||||
"django-probes==1.7.0",
|
"django-probes==1.7.0",
|
||||||
|
@ -47,7 +47,7 @@ dev = [
|
||||||
"ruff==0.9.3",
|
"ruff==0.9.3",
|
||||||
"djlint==1.36.4",
|
"djlint==1.36.4",
|
||||||
"mkdocs==1.6.1",
|
"mkdocs==1.6.1",
|
||||||
"mkdocs-material==9.5.50",
|
"mkdocs-material==9.6.3",
|
||||||
"mkdocs-static-i18n==1.3.0",
|
"mkdocs-static-i18n==1.3.0",
|
||||||
"vermin==1.6.0",
|
"vermin==1.6.0",
|
||||||
"pymdown-extensions==10.14.3",
|
"pymdown-extensions==10.14.3",
|
||||||
|
@ -58,11 +58,11 @@ test = [
|
||||||
"factory-boy==3.3.3",
|
"factory-boy==3.3.3",
|
||||||
"playwright>=1.39",
|
"playwright>=1.39",
|
||||||
"pytest==8.3.4",
|
"pytest==8.3.4",
|
||||||
"pytest-django==4.9.0",
|
"pytest-django==4.10.0",
|
||||||
"pytest-playwright==0.7.0",
|
"pytest-playwright==0.7.0",
|
||||||
"pytest-rerunfailures==15.0",
|
"pytest-rerunfailures==15.0",
|
||||||
"pytest-xdist>=3.5.0,<4",
|
"pytest-xdist>=3.5.0,<4",
|
||||||
"moto[s3]==5.0.27"
|
"moto[s3]==5.0.28"
|
||||||
]
|
]
|
||||||
docker = [
|
docker = [
|
||||||
"uwsgi==2.0.28",
|
"uwsgi==2.0.28",
|
||||||
|
|
Loading…
Reference in a new issue