deploy contrib/

This commit is contained in:
boyska 2014-02-24 14:54:10 +01:00
parent 6791d24a2c
commit bd8850b6a2
4 changed files with 42 additions and 1 deletions

22
contrib/docker/Dockerfile Normal file
View file

@ -0,0 +1,22 @@
FROM saucy
RUN DEBIAN_FRONTEND=noninteractive apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends
python python3 python-virtualenv
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends
python-pip
# e virtualenv3?? a me virtualenvwrapper fa un po' schifo...
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends
virtualenvwrapper
RUN git clone https://github.com/boyska/techrec.git /opt/techrec
RUN virtualenv --python=python2 /opt/virtualenv
RUN /opt/virtualenv/bin/pip install -r /opt/techrec/server/requirements.txt
RUN mkdir /opt/db
RUN chown nobody /opt/db
ENV TECHREC_CONFIG /opt/techrec/conf.py
USER nobody
WORKDIR /opt/techrec/server
ADD conf.py /opt/techrec/

7
contrib/docker/conf.py Normal file
View file

@ -0,0 +1,7 @@
### Your custom configuration
AUDIO_INPUT='/input'
AUDIO_OUTPUT='/output'
DB_URI='sqlite:////opt/db/techrec.db'
DEBUG = False
HOST='0.0.0.0'

View file

@ -0,0 +1,13 @@
### Supervisor script for techrec
#however, docker run does not seem to behave well in being supervisorized
[program:techrec]
autostart=true
command=docker run -a stdout -a stderr -rm -v /data/techrec:/output -v
/rec:/input -expose 8000 -p 9180:8000 --name tr techrec:latest
/opt/virtualenv/bin/python cli.py serve
startsecs=2
autorestart=false
# vim: set ft=dosini:

View file

@ -1,4 +1,3 @@
OUTPUT_DIR = 'output'
HOST = 'localhost'
PORT = '8000'
DEBUG = True