frontend groundwork
This commit is contained in:
		| @@ -13,6 +13,6 @@ EXPOSE 8000 | ||||
| # Set environment variables used by the deployment. These can be overridden by the user using this image. | ||||
| ENV NUM_WORKERS=1 | ||||
| ENV OSM_CACHE_DIR=/cache | ||||
| ENV MEMCACHED_HOST=none | ||||
| ENV MEMCACHED_HOST_PATH=none | ||||
|  | ||||
| CMD fastapi run src/main.py --port 8000 --workers $NUM_WORKERS | ||||
|   | ||||
| @@ -26,6 +26,6 @@ logging.config.dictConfig(config) | ||||
| if os.getenv('DEBUG', False): | ||||
|     logging.getLogger().setLevel(logging.DEBUG) | ||||
|  | ||||
| MEMCACHE_HOST = os.getenv('MEMCACHE_HOST', None) | ||||
| if MEMCACHE_HOST == "none": | ||||
|     MEMCACHE_HOST = None | ||||
| MEMCACHED_HOST_PATH = os.getenv('MEMCACHED_HOST_PATH', None) | ||||
| if MEMCACHED_HOST_PATH == "none": | ||||
|     MEMCACHED_HOST_PATH = None | ||||
|   | ||||
| @@ -12,7 +12,7 @@ class DummyClient: | ||||
|         return self._data[key] | ||||
|  | ||||
|  | ||||
| if constants.MEMCACHE_HOST is None: | ||||
| if constants.MEMCACHED_HOST_PATH is None: | ||||
|     client = DummyClient() | ||||
| else: | ||||
|     client = Client(constants.MEMCACHE_HOST, timeout=1) | ||||
|     client = Client(constants.MEMCACHED_HOST_PATH, timeout=1) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user