From 3e2e0bd98dd27b25b3702ee277f22e120073a7c1 Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Sun, 23 Oct 2022 11:53:33 -0700 Subject: [PATCH 1/8] fixing the port --- docker-compose-production.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose-production.yml b/docker-compose-production.yml index 5423467..dc110df 100644 --- a/docker-compose-production.yml +++ b/docker-compose-production.yml @@ -6,7 +6,7 @@ services: - nginx-net environment: VIRTUAL_HOST: metabolomics-usi.ucsd.edu,metabolomics-usi.gnps2.org - VIRTUAL_PORT: 5087 + VIRTUAL_PORT: 5000 LETSENCRYPT_HOST: metabolomics-usi.ucsd.edu,metabolomics-usi.gnps2.org LETSENCRYPT_EMAIL: mwang87@gmail.com command: /app/run_server.sh From bf8d8a4298448352a81b70e5884b8691954f38a2 Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Fri, 11 Nov 2022 14:07:28 -0800 Subject: [PATCH 2/8] adding automated builds --- .github/workflows/build.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..471daab --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +name: Docker Build Test + +on: + - push + - pull_request + schedule: + - cron: '0 0 * * 1' + +jobs: + build-test: + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.8] +# TODO: We probably should switch to using the Docker version. + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Build Docker + run: | + cd basic && docker build . From f134587f17b1020129651e141b165048396d677c Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Fri, 11 Nov 2022 14:08:34 -0800 Subject: [PATCH 3/8] upgrading base --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fa855a9..63a95df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM continuumio/miniconda3:4.8.2 +FROM continuumio/miniconda3:4.10.3 MAINTAINER Mingxun Wang "mwang87@gmail.com" WORKDIR /app From d8cbd087657b646d0f465ea3233841e0dd3ae7b3 Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Mon, 14 Nov 2022 15:11:18 -0800 Subject: [PATCH 4/8] updating versions of packages --- Dockerfile | 2 +- Makefile | 12 ++++++------ requirements.txt | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 63a95df..be424e5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN apt-get update -y && \ RUN conda create -y -n usi -c conda-forge -c bioconda -c defaults celery \ dash=1.20.0 dash-bootstrap-components=0.9.2 flask gunicorn \ joblib matplotlib numba numpy openssl qrcode rdkit requests \ - requests-cache scipy spectrum_utils werkzeug + requests-cache scipy spectrum_utils werkzeug==2.0.0 RUN /bin/bash -c 'source activate usi && pip install "git+https://github.com/berlinguyinca/spectra-hash.git#subdirectory=python" && pip install celery-once' RUN echo "source activate usi" > ~/.bashrc diff --git a/Makefile b/Makefile index 5d5f5bc..586efe7 100644 --- a/Makefile +++ b/Makefile @@ -23,19 +23,19 @@ clear-cache: #Docker Compose server-compose-interactive: - docker-compose build - docker-compose up + docker-compose --compatibility build + docker-compose --compatibility up server-compose: - docker-compose build - docker-compose up -d + docker-compose --compatibility build + docker-compose --compatibility up -d server-compose-production-interactive: - docker-compose build + docker-compose --compatibility build docker-compose -f docker-compose.yml -f docker-compose-production.yml --compatibility up server-compose-production: - docker-compose build + docker-compose --compatibility build docker-compose -f docker-compose.yml -f docker-compose-production.yml --compatibility up -d attach: diff --git a/requirements.txt b/requirements.txt index fdddf45..62ea414 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,5 +19,5 @@ requests requests_cache scipy spectrum_utils -werkzeug -git+https://github.com/berlinguyinca/spectra-hash.git#subdirectory=python +werkzeug==2.0.0 +git+https://github.com/berlinguyinca/spectra-hash.git#subdirectory=python \ No newline at end of file From ac1fec85b7a1a11fde42bb4fa9d42d589362a179 Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Mon, 14 Nov 2022 15:12:21 -0800 Subject: [PATCH 5/8] updating building --- .github/workflows/build.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 471daab..01b4964 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,10 +1,14 @@ name: Docker Build Test on: - - push - - pull_request + push: + branches: + master + pull_request: + branches: + master schedule: - - cron: '0 0 * * 1' + - cron: '0 0 * * 1' jobs: build-test: From 7400d5ff4ea455bcaa71344619f8ff6dd49683d5 Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Mon, 14 Nov 2022 15:24:09 -0800 Subject: [PATCH 6/8] using mambda --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index be424e5..855af87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,8 @@ WORKDIR /app RUN apt-get update -y && \ apt-get install -y libxrender-dev && \ apt-get install -y git-core -RUN conda create -y -n usi -c conda-forge -c bioconda -c defaults celery \ +RUN conda install -c conda-forge mamba +RUN mamba create -y -n usi -c conda-forge -c bioconda -c defaults celery \ dash=1.20.0 dash-bootstrap-components=0.9.2 flask gunicorn \ joblib matplotlib numba numpy openssl qrcode rdkit requests \ requests-cache scipy spectrum_utils werkzeug==2.0.0 From b32683b9ece85feb9b80e38fe7671e6164da77a4 Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Mon, 14 Nov 2022 21:33:19 -0800 Subject: [PATCH 7/8] pinning version of spectrum_utils --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 855af87..24dda63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN conda install -c conda-forge mamba RUN mamba create -y -n usi -c conda-forge -c bioconda -c defaults celery \ dash=1.20.0 dash-bootstrap-components=0.9.2 flask gunicorn \ joblib matplotlib numba numpy openssl qrcode rdkit requests \ - requests-cache scipy spectrum_utils werkzeug==2.0.0 + requests-cache scipy spectrum_utils==0.3.5 werkzeug==2.0.0 RUN /bin/bash -c 'source activate usi && pip install "git+https://github.com/berlinguyinca/spectra-hash.git#subdirectory=python" && pip install celery-once' RUN echo "source activate usi" > ~/.bashrc From 0e518027dbca0a9f57d3f0a27b29762e9e0c8a3b Mon Sep 17 00:00:00 2001 From: Mingxun Wang Date: Tue, 15 Nov 2022 13:54:29 -0800 Subject: [PATCH 8/8] limiting dns --- docker-compose-production.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker-compose-production.yml b/docker-compose-production.yml index dc110df..827f08a 100644 --- a/docker-compose-production.yml +++ b/docker-compose-production.yml @@ -5,9 +5,11 @@ services: - default - nginx-net environment: - VIRTUAL_HOST: metabolomics-usi.ucsd.edu,metabolomics-usi.gnps2.org + #VIRTUAL_HOST: metabolomics-usi.ucsd.edu,metabolomics-usi.gnps2.org + VIRTUAL_HOST: metabolomics-usi.gnps2.org VIRTUAL_PORT: 5000 - LETSENCRYPT_HOST: metabolomics-usi.ucsd.edu,metabolomics-usi.gnps2.org + #LETSENCRYPT_HOST: metabolomics-usi.ucsd.edu,metabolomics-usi.gnps2.org + LETSENCRYPT_HOST: metabolomics-usi.gnps2.org LETSENCRYPT_EMAIL: mwang87@gmail.com command: /app/run_server.sh deploy: