mirror of
https://github.com/agresdominik/predictify.git
synced 2026-04-21 09:51:56 +00:00
Merge pull request #21 from agresdominik/feat/containerize_app
Create a custom Dockerfile to decouple application dependencies from …
This commit is contained in:
+24
@@ -0,0 +1,24 @@
|
||||
FROM alpine:latest
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
RUN apk update && \
|
||||
apk add --no-cache \
|
||||
openssh \
|
||||
python3 \
|
||||
py3-pip \
|
||||
sqlite
|
||||
|
||||
EXPOSE 22
|
||||
|
||||
RUN mkdir /root/src
|
||||
|
||||
COPY ./startup.sh /root
|
||||
COPY ./requirements.txt /root
|
||||
COPY ./src/ /root/src/
|
||||
|
||||
RUN ls -la
|
||||
|
||||
VOLUME /root
|
||||
|
||||
ENTRYPOINT ["/bin/sh", "/root/startup.sh"]
|
||||
Executable
+14
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Starup the predictify scraper
|
||||
|
||||
if test -f ./requirements.txt
|
||||
then
|
||||
python3 -m venv .venv
|
||||
.venv/bin/pip install -r ./requirements.txt
|
||||
else
|
||||
printf "Missing requirements file! aborting...\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
.venv/bin/python3 src/scraper.py
|
||||
Reference in New Issue
Block a user