This commit is contained in:
2026-01-24 16:03:50 -05:00
parent 7019e34b7a
commit 0c4f7a05a1
6 changed files with 31 additions and 22 deletions

View File

@ -10,6 +10,9 @@ LETS_ENCRYPT_ENV=production
SECRET_SECRET_KEY_VERSION=v1 # length=100 charset=hex
SITE_URL=https://$DOMAIN
ALLOWED_HOSTS=$DOMAIN
CSRF_TRUSTED_ORIGINS=https://$DOMAIN
SITE_NAME=My UMap Server
SITE_DESCRIPTION=Welcome to my map of the world. No borders, no nations.
#UMAP_HELP_URL=http://mysite.com/documentation
@ -25,9 +28,9 @@ SITE_DESCRIPTION=Welcome to my map of the world. No borders, no nations.
## Language/Localization
#USE_I18N=false
#LANGUAGE_CODE="it"
#LEAFLET_LONGITUDE="15"
#LEAFLET_LATITUDE="15"
#LEAFLET_ZOOM="5"
#LEAFLET_LONGITUDE="-93"
#LEAFLET_LATITUDE="45"
#LEAFLET_ZOOM="10"
#UMAP_DEMO_SITE=1
#UMAP_READONLY=1

View File

@ -20,5 +20,7 @@
* `abra app new umap --secrets`
* `abra app config <app-name>`
* `abra app deploy <app-name>`
* `abra app command <app-name> app create_admin`
* Access admin interface at `https://<app-name>/admin`
For more, see [`docs.coopcloud.tech`](https://docs.coopcloud.tech).

View File

@ -3,4 +3,8 @@
export CONFIG_VERSION=v1
export NGINX_VERSION=v1
export NGINX_UMAP_VERSION=v1
export NGINX_UMAP_VERSION=v1
create_admin(){
umap createsuperuser
}

View File

@ -10,15 +10,17 @@ services:
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
## Edit the following line if you are using one, but not both, "Redirect" sections below
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirectscheme,${STACK_NAME}-redirecthostname"
## Redirect from EXTRA_DOMAINS to DOMAIN
# - "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.regex=^http[s]?://([^/]*)/(.*)"
# - "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.replacement=https://${DOMAIN}/$${2}"
# - "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.permanent=true"
## Redirect HTTP to HTTPS
# - "traefik.http.middlewares.${STACK_NAME}-redirectscheme.redirectscheme.scheme=https"
# - "traefik.http.middlewares.${STACK_NAME}-redirectscheme.redirectscheme.permanent=true"
# Edit the following line if you are using one, but not both, "Redirect" sections below
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirectscheme,${STACK_NAME}-redirecthostname"
# Redirect from EXTRA_DOMAINS to DOMAIN
- "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.regex=^http[s]?://([^/]*)/(.*)"
- "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.replacement=https://${DOMAIN}/$${2}"
- "traefik.http.middlewares.${STACK_NAME}-redirecthostname.redirectregex.permanent=true"
# Redirect HTTP to HTTPS
- "traefik.http.middlewares.${STACK_NAME}-redirectscheme.redirectscheme.scheme=https"
- "traefik.http.middlewares.${STACK_NAME}-redirectscheme.redirectscheme.permanent=true"
environment:
STACK_NAME: $STACK_NAME
volumes:
- static:/static:ro
- data:/data:ro
@ -32,10 +34,10 @@ services:
networks:
- proxy
- umap
umap:
app:
image: umap/umap:3.5.0
hostname: ${STACK_NAME}-app
networks:
- umap
deploy:
@ -43,7 +45,7 @@ services:
condition: on-failure
labels:
## When you're ready for release, run "abra recipe sync <name>" to set this
- "coop-cloud.${STACK_NAME}.version=0.0.1+2.9.3"
- "coop-cloud.${STACK_NAME}.version=0.1.0+3.5.0"
## Enable backups: https://docs.coopcloud.tech/maintainers/handbook/#how-do-i-configure-backuprestore
# - "backupbot.backup=true"
# - "backupbot.backup.path=/some/path"
@ -51,9 +53,8 @@ services:
DATABASE_URL: postgis://postgres@db/postgres
STATIC_ROOT: /srv/umap/static
MEDIA_ROOT: /srv/umap/uploads
REALTIME_ENABLED: 1
REALTIME_ENABLED: "True"
REDIS_URL: redis://redis:6379
ALLOWED_HOSTS: $DOMAIN
volumes:
- data:/srv/umap/uploads
- static:/srv/umap/static
@ -64,7 +65,7 @@ services:
secrets:
- secret_key
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost:9000"]
# test: ["CMD", "curl", "-f", "http://localhost:8000"]
# interval: 30s
# timeout: 10s
# retries: 10

View File

@ -31,7 +31,7 @@ http {
# Proxy pass to ASGI server
location / {
proxy_pass http://umap:8000;
proxy_pass http://{{ env "STACK_NAME" }}-app:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

View File

@ -1,2 +1 @@
SECRET_KEY='{{ secret "secret_key" }}'
ALLOWED_HOSTS=[ '{{ env "DOMAIN" }}{{ env "EXTRA_DOMAINS" }}' ]
SECRET_KEY='{{ secret "secret_key" }}'