From d5a8cd72821703390c3a254b1e3459fb7ce8e40a Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Mon, 2 Oct 2023 13:30:52 -0700 Subject: [PATCH 1/3] updating readme --- Procfile | 1 - README.md | 9 --------- 2 files changed, 10 deletions(-) delete mode 100644 Procfile diff --git a/Procfile b/Procfile deleted file mode 100644 index 1497e52..0000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: gunicorn -w 1 app:server \ No newline at end of file diff --git a/README.md b/README.md index 649427b..6ebc201 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,5 @@ ## GNPS LCMS Visualization Dashboard -### URL Parameters - -1. usi -1. xicmz - -### Heroku Deployment - -We are also trying to support a heroku deployment. This is why we have a Procfile. - ### Example Sources of Data 1. GNPS Analysis Tasks - [mzspec:GNPS:TASK-d93bdbb5cdda40e48975e6e18a45c3ce-f.mwang87/data/Yao_Streptomyces/roseosporus/0518_s_BuOH.mzXML:scan:171](https://gnps-lcms.ucsd.edu/?usi=mzspec%3AGNPS%3ATASK-d93bdbb5cdda40e48975e6e18a45c3ce-f.mwang87%2Fdata%2FYao_Streptomyces%2Froseosporus%2F0518_s_BuOH.mzXML%3Ascan%3A171&xicmz=841.3170166%3B842.3170166&xic_tolerance=0.5&xic_norm=No&show_ms2_markers=1&ms2_identifier=MS2%3A1176) From 121b45ba85b3474da72acc00821c359a98facf35 Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Mon, 2 Oct 2023 13:34:26 -0700 Subject: [PATCH 2/3] adding a template --- .env_template | 1 + README.md | 10 ++++++++++ docker-compose.yml | 6 ++---- 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 .env_template diff --git a/.env_template b/.env_template new file mode 100644 index 0000000..63128ab --- /dev/null +++ b/.env_template @@ -0,0 +1 @@ +HOSTNAME=dashboard.gnps2.org \ No newline at end of file diff --git a/README.md b/README.md index 6ebc201..d62e05f 100644 --- a/README.md +++ b/README.md @@ -130,3 +130,13 @@ make all - Callbacks: https://dash.plotly.com/basic-callbacks - Plotly express: https://plotly.com/python/plotly-express/ - Plotly: https://plotly.com/python/ + + +## Production Deployment + +One major thing about production deployemnts is the DNS routing. You want to do the following steps to have everything route properly: + +1. Create a DNS entry in your DNS server for the domain you want to use (e.g. dashboard.gnps2.org) and point it to the server you're running this on +1. Copy .env_template to .env and update the domain name to the one you want to use +1. Run a reverse proxy (https://github.com/mwang87/GNPS_ExtensionsReverseProxy) +1. Run in production mode ```make server-compose-production``` \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index ad8181b..11f8e69 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,11 +17,9 @@ services: restart: unless-stopped command: /app/run_server.sh environment: - #VIRTUAL_HOST: gnps-lcms.ucsd.edu,dashboard.gnps2.org,gnps-lcms.gnps2.org - VIRTUAL_HOST: dashboard.gnps2.org,gnps-lcms.gnps2.org + VIRTUAL_HOST: ${HOSTNAME:-gnps-lcms.gnps2.org} VIRTUAL_PORT: 5000 - #LETSENCRYPT_HOST: gnps-lcms.ucsd.edu,dashboard.gnps2.org,gnps-lcms.gnps2.org - LETSENCRYPT_HOST: dashboard.gnps2.org,gnps-lcms.gnps2.org + LETSENCRYPT_HOST: ${HOSTNAME:-gnps-lcms.gnps2.org} LETSENCRYPT_EMAIL: mwang87@gmail.com deploy: resources: From 2f1158ac7d936a8bf83ef2fdcc9a9b3b6db30a98 Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Mon, 2 Oct 2023 13:37:56 -0700 Subject: [PATCH 3/3] adding domain name --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index df2219c..92b8b9a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -*pyc \ No newline at end of file +*pyc +.env \ No newline at end of file