diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2020-09-22 17:24:30 +0530 |
---|---|---|
committer | Navan Chauhan <navanchauhan@gmail.com> | 2020-09-22 17:24:30 +0530 |
commit | 854cc0b53af56776fa967dd7793525eb0e22e051 (patch) | |
tree | 6b9aaefacab89282fc7d830d32f3ec863e4f0f5c | |
parent | a53505f8935fecedbc91589ab49002ee80f0bfa6 (diff) |
added docker compose functionality for quick testing
-rw-r--r-- | Dockerfile | 47 | ||||
-rw-r--r-- | docker-compose.yml | 19 |
2 files changed, 66 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6e793c2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,47 @@ +FROM ubuntu:20.04 AS builder + +LABEL maintainer="Navan Chauhan <navanchauhan@gmail.com>" \ + org.label-schema.name="Curie Module" \ + org.label-schema.description="https://navanchauhan.github.io/Curie" + +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update && apt-get install -y \ + git \ + libopenbabel-dev \ + libopenbabel6 \ + pymol \ + python3-distutils \ + python3-lxml \ + python3-openbabel \ + python3-pymol \ + python3-pip \ + openbabel \ + autodock-vina \ + pandoc \ + texlive-xetex \ + imagemagick \ + python3-rdkit \ + libmysqlclient-dev \ + mysql-client \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +EXPOSE 8080 + +WORKDIR /curie-web + +COPY requirements.txt /curie-web +RUN python3 -m pip install -r requirements.txt + +# Install PLIP +RUN git clone https://github.com/navanchauhan/plip source \ + && cd source \ + && python3 setup.py install \ + && cd .. \ + && rm -r source + +COPY config.ini /curie-web +COPY app /curie-web/app + +COPY run.py /curie-web +COPY api.py /curie-web +CMD gunicorn -w 4 api:app -k uvicorn.workers.UvicornWorker -b "0.0.0.0:8080" diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..33f5b2b --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +version: "2" +services: + app: + build: . + links: + - db + ports: + - "8080:8080" + db: + image: mysql:8.0 + ports: + - "32000:3306" + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: curie + MYSQL_USER: curieweb + MYSQL_PASSWORD: curie-web-uwu + volumes: + - ./db:/docker-entrypoint-initdb.d/:ro |