diff --git a/examples/customized_docker_image/Dockerfile b/examples/customized_docker_image/Dockerfile new file mode 100644 index 0000000..ec825e8 --- /dev/null +++ b/examples/customized_docker_image/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.9 + +RUN pip install cellxgene-gateway 'MarkupSafe<2.1' + +COPY customize_ui.sh customize_ui.sh +RUN CELLXGENE_GATEWAY_DIR=/usr/local/lib/python3.9/site-packages/cellxgene_gateway . ./customize_ui.sh + +ENV CELLXGENE_DATA=/cellxgene-data +ENV CELLXGENE_LOCATION=/usr/local/bin/cellxgene +EXPOSE 5005 + +CMD ["cellxgene-gateway"] diff --git a/examples/customized_docker_image/README.md b/examples/customized_docker_image/README.md new file mode 100644 index 0000000..800862b --- /dev/null +++ b/examples/customized_docker_image/README.md @@ -0,0 +1,13 @@ +# Purpose + +This is a simple example of how to make a small script to customize the UI of cellxgene-gateway. The script that does the customization is `customize_ui.sh`, it simply makes the main header green using CSS but you could do anything you want there (including adding more script tags, etc). + +# Usage + +``` +docker build -t cellxgene_custom . +docker run -p 5005:5005 cellxgene_custom +``` + +If you now open http://localhost:5005 you should see a green cellxgene gateway header. + diff --git a/examples/customized_docker_image/customize_ui.sh b/examples/customized_docker_image/customize_ui.sh new file mode 100644 index 0000000..854d13d --- /dev/null +++ b/examples/customized_docker_image/customize_ui.sh @@ -0,0 +1,3 @@ +# make the header bright green +find "${CELLXGENE_GATEWAY_DIR}/templates" -name index.html -exec sed -i -e 's//\ +>