From d944a31d596865338262b8705c845d93a900a2b9 Mon Sep 17 00:00:00 2001 From: Roman Hillje Date: Fri, 20 May 2022 14:57:10 +0200 Subject: [PATCH] Dockerise cellxgene-gateway --- Dockerfile | 8 ++++++++ README.md | 27 +++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f99b62c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM python:3.9 + +RUN pip install cellxgene-gateway 'MarkupSafe<2.1' + +ENV CELLXGENE_DATA=/cellxgene-data +ENV CELLXGENE_LOCATION=/usr/local/bin/cellxgene + +CMD ["cellxgene-gateway"] diff --git a/README.md b/README.md index 72c0ed5..3e980cf 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,33 @@ If any of the following optional variables are set, [ProxyFix](https://werkzeug. The defaults should be fine if you set up a venv and cellxgene_data folder as above. +## Running cellxgene-gateway with Docker + +First, build Docker image: + +```bash +docker build -t cellxgene-gateway . +``` + +Then, cellxgene-gateway can be launched as such: + +```bash +docker run -it --rm \ +-v :/cellxgene-data \ +-p 5005:5005 \ +cellxgene-gateway +``` + +Additional environment variables can be provided with the `-e` parameter: + +```bash +docker run -it --rm \ +-v :/cellxgene-data \ +-e GATEWAY_PORT=8080 \ +-p 8080:8080 \ +cellxgene-gateway +``` + # Customization The current paradigm for customization is to modify files during a build or deployment phase: