-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (30 loc) · 1.14 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
# Copyright (C) Abraham Aondowase Yusuf - All Rights Reserved
# Unauthorized copying of this file, via any medium is strictly prohibited
# Proprietary and confidential
# This file is subject to the terms and conditions defined in
# file 'LICENSE', which is part of this source code package.
# Written by Abraham Aondowase Yusuf <[email protected]>, April 2018
FROM python:3.6
LABEL Author="Abraham Yusuf <[email protected]>"\
Client="Cubic Multi Services Limited"
# Install Supervisord
RUN apt-get update \
&& apt-get install -y supervisor \
&& rm -rf /var/lib/apt/lists/* && \
mkdir /opt/supervisor
# Install webcrawler
COPY . /usr/src/
WORKDIR /usr/src
RUN python setup.py bdist_wheel && \
pip install --no-cache-dir -U dist/webcrawler*.whl && \
rm -rf /usr/src/* && \
useradd -ms /bin/bash webcrawler && \
mkdir -p /home/webcrawler/logs && \
chmod ugo+rwX /home/webcrawler/logs
WORKDIR /home/webcrawler
VOLUME [ "/home/webcrawler/logs" ]
# Copy config files
COPY config/supervisord.conf /supervisord.conf
COPY config/uwsgi.yml /uwsgi.yml
COPY config/entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]