flatisfy/docker/Dockerfile

48 lines
1.3 KiB
Docker
Raw Normal View History

2017-06-13 20:08:49 +02:00
FROM python:2
MAINTAINER Phyks <phyks@phyks.me>
2017-06-13 20:08:49 +02:00
# Setup layout.
RUN useradd -d /home/user -m -s /bin/bash -U user
# Install OS dependencies.
RUN apt-get update && \
apt-get install -y git libffi-dev \
2017-06-13 20:08:49 +02:00
libxml2-dev libxslt-dev libyaml-dev libtiff-dev libjpeg-dev zlib1g-dev \
libfreetype6-dev libwebp-dev build-essential gcc g++ wget;
# Install latest pip and python dependencies.
RUN pip install -U setuptools && \
2017-06-13 20:08:49 +02:00
pip install html2text simplejson BeautifulSoup
# Install node.js.
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \
&& apt-get install -y nodejs
# Install weboob's code itself.
RUN git clone https://git.weboob.org/weboob/devel /home/user/weboob \
&& cd /home/user/weboob \
&& pip install .
2017-06-13 20:08:49 +02:00
RUN mkdir -p /flatisfy/data
VOLUME /flatisfy
# Install Flatisfy.
RUN cd /home/user \
&& git clone https://git.phyks.me/Phyks/flatisfy/ ./app \
2017-06-13 20:08:49 +02:00
&& cd ./app \
&& pip install -r requirements.txt \
&& npm install \
&& npm run build:prod
RUN chown user:user -R /home/user
2017-09-24 19:22:40 +02:00
RUN mkdir -p /home/user/.local/share/flatisfy
2017-06-13 20:08:49 +02:00
2017-11-27 12:23:08 +01:00
COPY ./run.sh /home/user/run.sh
2017-06-13 20:08:49 +02:00
RUN chmod +x /home/user/run.sh
2017-12-11 13:56:54 +01:00
COPY ./update_weboob.sh /home/user/update_weboob.sh
RUN chmod +x /home/user/update_weboob.sh
2017-06-13 20:08:49 +02:00
# Run server.
EXPOSE 8080
2017-12-11 13:56:54 +01:00
CMD /home/user/run.sh