Commit 9c2536ca authored by carlosribas's avatar carlosribas
Browse files

Use Gunicorn instead of runserver

parent 230805d7
......@@ -17,15 +17,13 @@ RUN apt-get update && apt-get install -y \
python-pip \
supervisor
ARG RNACENTRAL_HOME=/srv/rnacentral
ENV RNACENTRAL_HOME=$RNACENTRAL_HOME
ENV RNACENTRAL_HOME=/srv/rnacentral
ENV RNACENTRAL_LOCAL=$RNACENTRAL_HOME/local
ENV SUPERVISOR_CONF_DIR=${SUPERVISOR_CONF_DIR:-"/etc/supervisor"}
# Create folders. Install Infernal and node.js
RUN \
mkdir -p $RNACENTRAL_HOME/local && \
mkdir $RNACENTRAL_HOME/static && \
cd $RNACENTRAL_LOCAL && \
curl -OL http://eddylab.org/infernal/infernal-1.1.1.tar.gz && \
tar -xvzf infernal-1.1.1.tar.gz && \
......@@ -45,6 +43,7 @@ RUN \
cd $RNACENTRAL_HOME && \
git clone https://github.com/RNAcentral/rnacentral-webcode.git && \
pip install -r $RNACENTRAL_HOME/rnacentral-webcode/rnacentral/requirements.txt && \
pip install gunicorn && \
cd $RNACENTRAL_HOME/rnacentral-webcode/rnacentral/portal/static && npm install --only=production
COPY ./entrypoint.sh /entrypoint.sh
......
......@@ -35,7 +35,7 @@ else
COMPRESS_ENABLED = False
RQ_QUEUES = {
"default": {
"HOST": "192.168.1.3",
"HOST": "redis",
"PORT": 8051,
"DB": 0,
"DEFAULT_TIMEOUT": 360,
......@@ -78,7 +78,7 @@ stderr_logfile=/var/log/rqworkers.err.log
stdout_logfile=/var/log/rqworkers.out.log
[program:rnacentral]
command=python $RNACENTRAL_HOME/rnacentral-webcode/rnacentral/manage.py runserver 0.0.0.0:8000
command=gunicorn --chdir $RNACENTRAL_HOME/rnacentral-webcode/rnacentral --bind 0.0.0.0:8000 rnacentral.wsgi:application
user=nobody
autostart=true
autorestart=true
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment