mirror of
https://github.com/Novartis/cellxgene-gateway.git
synced 2026-09-23 01:28:12 +08:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f296efcc55 | ||
|
|
facfb27d5c |
@@ -0,0 +1,14 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
RUN mkdir /cellxgene-data
|
||||||
|
|
||||||
|
CMD ["cellxgene-gateway"]
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# 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 .
|
||||||
|
CELLXGENE_DATA=`pwd`/../../../cellxgene_data
|
||||||
|
docker run -p 5005:5005 --mount src=$CELLXGENE_DATA,target=/cellxgene-data,type=bind cellxgene_custom
|
||||||
|
```
|
||||||
|
|
||||||
|
If you now open http://localhost:5005 you should see a green cellxgene gateway header.
|
||||||
|
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# make the header bright green
|
||||||
|
find "${CELLXGENE_GATEWAY_DIR}/templates" -name index.html -exec sed -i -e 's/<head>/<head>\
|
||||||
|
> <style> header h3 {color: #0F0;} <\/style>/g' {} \;
|
||||||
Reference in New Issue
Block a user