kartoza / docker-mapproxy

A docker recipe for http://mapproxy.org/
Apache License 2.0
62 stars 60 forks source link

MAPPROXY_CACHE_DIR is not used #69

Open wlorenzetti opened 1 month ago

wlorenzetti commented 1 month ago

What is the bug or the crash?

I try to use MAPPROXY_CACHE_DIR env var but seems it is not used, infact the cache_data directory is always create inside the /multi_mapproxy directory when env var MULTI_MAPPROXY is set to true.

Steps to reproduce the issue

I just make a simple docker-compose.yml like this:

services:
   mapproxy:
      image: kartoza/mapproxy
      volumes:
        - ./config:/multi_mapproxy
        - ${MAPPROXY_DATA_VOLUME}:/cache_data
      ports:
        - "80:8080"
      restart: on-failure
      environment:
        - PRODUCTION
        - PROCESSES
        - CHEAPER
        - THREADS
        - MAPPROXY_USER_ID
        - MAPPROXY_GROUP_ID
        - MULTI_MAPPROXY
        - ALLOW_LISTING
        - LOGGING
      logging:
        driver: "json-file"
        options:
          max-size: "200k"
          max-file: "10"

with the following .env file:

# Enviroment variable for MapProxy deploy
# ---------------------------------------

# Deploy envs
PRODUCTION=true
PROCESSES=20
CHEAPER=16
THREADS=10
MAPPROXY_USER_ID=1000
MAPPROXY_GROUP_ID=1000
MULTI_MAPPROXY=true
ALLOW_LISTING=True
LOGGING=true

# Local envs
MAPPROXY_DATA_VOLUME='/root/mapproxy_cache'

But with the docker compose up the MAPPROXY_CACHE_DIR=/cache_data it is ignored and the cache data are stored inside the /multi_mapproxy/cache_data directory

Versions

Last kartoza/mapproxy:latest docker hub image

Additional context

No response

NyakudyaA commented 1 month ago

@wlorenzetti Does the directory actually gets created in the container. What is the value set for you mapproxy.yml cache directory

i.e directory: /cache_data/srtm_cache