mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2024-10-01 03:35:38 -04:00
Support a data path for Docker usage
Storing somewhere in the Docker container doesn't help anyone - we should use the volume
This commit is contained in:
parent
176735eeb8
commit
70969d43ec
@ -15,4 +15,4 @@ RUN pip install . gobject PyGObject "matrix-nio@git+https://github.com/poljar/ma
|
||||
|
||||
VOLUME /data
|
||||
ENTRYPOINT ["pantalaimon"]
|
||||
CMD ["-c", "/data/pantalaimon.conf"]
|
||||
CMD ["-c", "/data/pantalaimon.conf", "--data-path", "/data"]
|
||||
|
@ -128,8 +128,9 @@ async def message_router(receive_queue, send_queue, proxies):
|
||||
default=None,
|
||||
)
|
||||
@click.option("-c", "--config", type=click.Path(exists=True))
|
||||
@click.option("--data-path", type=click.Path(exists=True))
|
||||
@click.pass_context
|
||||
def main(context, log_level, config):
|
||||
def main(context, log_level, config, data_path):
|
||||
loop = asyncio.get_event_loop()
|
||||
|
||||
conf_dir = user_config_dir("pantalaimon", "")
|
||||
@ -137,6 +138,7 @@ def main(context, log_level, config):
|
||||
create_dirs(data_dir, conf_dir)
|
||||
|
||||
config = config or os.path.join(conf_dir, "pantalaimon.conf")
|
||||
data_dir = data_path or data_dir
|
||||
|
||||
if log_level:
|
||||
log_level = parse_log_level(log_level)
|
||||
|
Loading…
Reference in New Issue
Block a user