-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
50 lines (37 loc) · 1.3 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Version: 3.2.1
FROM python:2.7-slim
LABEL maintainer="[email protected]"
RUN apt-get update
RUN apt-get install -y --no-install-recommends build-essential libssl-dev libffi-dev python-dev
# Install PostgreSQL Driver for Python2
RUN apt-get install -y --no-install-recommends libpq-dev
RUN pip install psycopg2
# Install MySQL Driver for Python 2
RUN apt-get install -y --no-install-recommends python-mysqldb
# Make installation directory and change to there
RUN mkdir /install
WORKDIR /install
# Install Python packages
COPY requirements requirements
RUN pip install -r requirements/production.txt
# BOTS installation
COPY bots-3.2.0.tar.gz bots-3.2.0.tar.gz
RUN tar -xf bots-3.2.0.tar.gz && \
cd bots-3.2.0 && \
python setup.py install && \
cd ..
COPY postinstall.py postinstall.py
RUN python postinstall.py
# Add Crontab file
COPY crontab /usr/local/lib/python2.7/site-packages/bots/config/
# Copy Supervisord.conf file
COPY supervisord.conf /etc/supervisor/supervisord.conf
CMD ["/usr/local/bin/supervisord"]
# Map persisted files to following directories:
# /usr/local/lib/python2.7/site-packages/bots/config
# /usr/local/lib/python2.7/site-packages/bots/botssys
# /usr/local/lib/python2.7/site-packages/bots/usersys
# BOTS Management Interface
EXPOSE 8080
# Supervisord HTTP Server
EXPOSE 9001