-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
45 lines (35 loc) · 1.27 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
########################################################
# Dockerfile to build Python application 'gold-digger'
# Based on Ubuntu
########################################################
FROM ubuntu
MAINTAINER ROI Hunter
# Setup system locale
RUN locale-gen en_US.utf8
ENV LANG en_US.utf8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.utf8
RUN update-locale LANG=en_US.utf8
# Install system dependencies
RUN apt-get update && \
apt-get install -y git python3 python3-pip && \
apt-get install -y libpq-dev supervisor cron
# Get GIT repository with project
RUN git clone -b master https://github.com/business-factory/gold-digger.git
# Set the default directory
WORKDIR /gold-digger
# Install Python dependencies
RUN pip3 install -U pip wheel && \
pip3 install --use-wheel -r requirements.txt
# Create local config file
ADD gold_digger/config/params_local.py gold_digger/config/params_local.py
# Setup cron for daily updates
# Add crontab file in the cron directory
ADD crontab.conf /etc/cron.d/daily-exchange-rates
RUN chmod 600 /etc/cron.d/daily-exchange-rates
RUN touch cron.log
# Setup supervisor
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN mkdir -p /var/log/gold-digger
# Command to execute
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]