Settings
ReadyMap can be configured by setting environment variables. With Docker, you set environment variables in the environment section of your container. For example:
readymap:
image: pelicanmapping/readymap:4.6.0
# All of your environment variable settings go here.
environment:
- LICENSE_TEXT=XXX
ReadyMap can be configured with the following environment variables
- APPLICATION_NAME - The name of the application. This name will be displayed in the title bar and various places throughout the user interface. This is set to ReadyMap by default.
- FAVICON - A URL to an ico file that will be used as the favicon for your server.
- COMPANY_NAME - The name of your company, displayed in various places throughout the interface.
- COMPANY_URL - A URL pointing to your company website. When the company logo is clicked in ReadyMap it will point to your website.
- COMPANY_LOGO - A URL pointing to an image file that will be displayed on the login page.
- CLOSE_DATASETS - Whether or not to close files in the generate on demand worker after each tile generation. Default is True. This could result in slower tile generation but can keep servers with lots of layers from running out of memory if too many layers are accessed simultaneously.
- APPLICATION_LOGO - A URL pointing to an image file of a custom logo for your ReadyMap installation.
- DOCUMENTATION_URL - A URL pointing to the applications documentation. This is useful if you want to rebrand your documentation from the default ReadyMap docs.
- LANDING_PAGE - A URL that ReadyMap will redirect to when the root of the server is accessed.
- NUM_WORKERS - The number of background workers started for processing general background tasks.
- NUM_TILERS - The number of background workers started for seeding map tiles via cache jobs.
- NUM_TILE_GENERATORS - The number of background workers started for generating map tiles.
- NUM_WEB_PROCESSES - The number of web processes dedicated to serving web requests and cached tiles
- NUM_GENERATE_ON_DEMAND_PROCESSES - The number of processes dedicated to generating uncached tiles on demand. Generating tiles, especially from complex layers, can be quite CPU and memory intensive so this number should generally be small (ie 1 or 2) unless you are dedicating adequate resources to your ReadyMap machine.
- USE_LAYER_NAMES - When set to True, ReadyMap will expose layers using their name instead of their id in GIS services. This could make switching between ReadyMap servers that have similar layer names easier when configuring earth files.
- USE_SSL - Run ReadyMap with SSL support.
- SSL_CERTIFICATE_FILE - Absolute path to your SSL certificate file.
- SSL_CERTIFICATE_KEY_FILE - Absolute path to your SSL key file.
- SSL_CERTIFICATE_CHAIN_FILE - Absolute path to your SSL certificate chain file.
- SENTRY_DSN - Your projects DSN if you want to send errors to Sentry to monitor errors.
- SENTRY_TRACES_SAMPLE_RATE - The sentry trace sample rate. Should be a float between 0.0 and 1.0. Default is 0.0.
- SENTRY_PROFILES_SAMPLE_RATE - The sentry profile sample rate. Should be a float between 0.0 and 1.0. Default is 0.0.
- FILE_UPLOAD_TEMP_DIR - Set the directory where files will be stored during upload other than /tmp. This is useful if you are running ReadyMap on a small VM with limited storage space and want to set your upload directory to a tmp folder a large NAS drive instead to avoid using too much space on your VM.
- MBTILES_ROOT - Set the directory where mbtiles files can be served from. Default is /data/mbtiles.
- TILE_EXPIRES_SECONDS - The number of seconds that clients should cache tiles as reported by the Expires http header. Default 432000 (5 days)
- TILE_MEMORY_CACHE_SECONDS - The number of seconds that tiles should be cached in memory. Default 1800 (30 minutes)
- TILES_USE_TMS - Whether to cache in TMS format. Default is False.
- TILES_USE_SLIPPY - Whether to cache in slippy map format. Default is False.
- TILES_USE_TILECACHE - Whether to cache in tilecache format. Default is True.
- TILES_USE_S3 - Whether to cache tiles to AWS S3. Your credentials must be available either via an IAM role on your instance or via environment variables in your docker-compose.yml file.
- S3_BUCKET_NAME - The S3 bucket to store your tiles in if TILES_USE_S3 is enabled.
- S3_TILE_PREFIX - The prefix for keys if TILES_USE_S3 is enabled. This is the "directory" on S3 that your files will be stored in. Default is "tiles".
- S3_TILE_TEMPLATE - How the tiles will be stored in S3 if TILES_USE_S3 is enabled. Default is "{z}/{x}/{y}.{ext}". Valid template paramaters are:
- {z} - The zoom level of the tile.
- {x} - The x tile coordinate of the tile.
- {y} - The y tile coordinate in TMS coordinate system (origin bottom left)
- {-y} - The y tile coordinate in XYZ coordinate system (origin upper left).
- {.ext} - The file extension.
- DATABASE_HOST - The database host. Default is "db".
- DATABASE_USER - The database user. Default is "postgres"
- DATABASE_PASSWORD - The database password. Default is "readymap"
- DATABASE_NAME - The database name. Default is "readymap"
- DATABASE_PORT - The database port. Default is 5432.
- REDIS_HOST - The redis host. Default is "redis".
- SECRETS_DIR - The directory to read secrets from if you are using Kubernetes secrets. Default is /run/secrets.
- EXTERNAL_REQUEST_TIMEOUT - The amount of time in seconds to wait for an external service like an XYZ or WMS layer to respond before continuing. Default is 3 seconds.
- LICENSE_FILE - Location of the license file provided to you. Must be in a location accessible to the docker container via a volume mount.
- LICENSE_TEXT - The contents of the license file provided to you. Can be used in place of LICENSE_FILE to avoid needing to copy license files around.