mirror of
https://github.com/agresdominik/predictify.git
synced 2026-04-21 17:55:49 +00:00
Create a custom Dockerfile to decouple application dependencies from host.
* Create a dockerfile based on alpine. * Create a start script to startup scraper.
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
|||||||
|
FROM alpine:latest
|
||||||
|
|
||||||
|
WORKDIR /root
|
||||||
|
|
||||||
|
RUN apk update && \
|
||||||
|
apk add --no-cache \
|
||||||
|
openssh \
|
||||||
|
python3 \
|
||||||
|
sqlite \
|
||||||
|
pip \
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
EXPOSE 22
|
||||||
|
|
||||||
|
VOLUME /root/data
|
||||||
|
VOLUME /root/app
|
||||||
|
|
||||||
|
ENTRYPOINT /root/startup.sh;
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Starup the predictify scraper
|
||||||
|
|
||||||
|
if test -f ./requirements.txt
|
||||||
|
then
|
||||||
|
pip install -r ./requirements.txt
|
||||||
|
else
|
||||||
|
printf "Missing requirements file! aborting...\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
python3 ./src/scraper.py
|
||||||
|
|
||||||
Reference in New Issue
Block a user