Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
FROM continuumio/miniconda3:4.10.3
FROM ubuntu:22.04
MAINTAINER Mingxun Wang "[email protected]"

WORKDIR /app
RUN apt-get update -y && \
apt-get install -y libxrender-dev && \
apt-get install -y git-core libarchive-dev
RUN conda install -c conda-forge mamba
apt-get install -y git-core libarchive-dev build-essential wget vim curl

# Install Mamba
ENV CONDA_DIR /opt/conda
RUN wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O ~/miniforge.sh && /bin/bash ~/miniforge.sh -b -p /opt/conda
ENV PATH=$CONDA_DIR/bin:$PATH
RUN echo "export PATH=$CONDA_DIR:$PATH" >> ~/.bashrc

RUN mamba create -y -n usi -c conda-forge -c bioconda -c defaults celery==5.3.6 \
dash=1.20.0 dash-bootstrap-components=0.9.2 flask gunicorn \
joblib matplotlib==3.6.3 numba numpy openssl qrcode rdkit requests \
Expand Down
20 changes: 20 additions & 0 deletions docker-compose-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,26 @@ services:
max-size: "10m"
max-file: "3"

metabolomicsusi-api1:
networks:
- default
- nginx-net
environment:
VIRTUAL_HOST: ${HOSTNAME:-api.metabolomics-usi.gnps2.org}
VIRTUAL_PORT: 5000
LETSENCRYPT_HOST: ${HOSTNAME:-api.metabolomics-usi.gnps2.org}
LETSENCRYPT_EMAIL: [email protected]
command: /app/run_server.sh
deploy:
resources:
limits:
memory: 16000M
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"

metabolomicsusi-worker:
deploy:
resources:
Expand Down
31 changes: 31 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,37 @@ services:
- default
restart: always
command: /app/run_dev_server.sh
labels:
autoheal: true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/heartbeat"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s

metabolomicsusi-api1:
build:
context: .
dockerfile: Dockerfile
container_name: metabolomicsusi-api1
ports:
- "5088:5000"
volumes:
- ./tmp:/app/tmp:rw
- ./logsapi/:/app/logs:rw
networks:
- default
restart: always
command: /app/run_dev_server.sh
labels:
autoheal: true
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/heartbeat"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s

metabolomicsusi-worker:
build:
Expand Down
Empty file added logsapi/.gitkeep
Empty file.
1 change: 0 additions & 1 deletion metabolomics_spectrum_resolver/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
def render_homepage():
return flask.render_template("homepage.html")


@blueprint.route("/contributors", methods=["GET"])
def render_contributors():
return flask.render_template("contributors.html")
Expand Down
Loading