mirror of
https://github.com/agresdominik/predictify.git
synced 2026-04-21 17:55:49 +00:00
Fix Dockerfile.
This commit is contained in:
+17
-11
@@ -1,18 +1,24 @@
|
|||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
WORKDIR /root
|
WORKDIR /root
|
||||||
|
|
||||||
RUN apk update && \
|
RUN apk update && \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
openssh \
|
openssh \
|
||||||
python3 \
|
python3 \
|
||||||
sqlite \
|
py3-pip \
|
||||||
pip \
|
sqlite
|
||||||
|
|
||||||
EXPOSE 80
|
|
||||||
EXPOSE 22
|
EXPOSE 22
|
||||||
|
|
||||||
VOLUME /root/data
|
RUN mkdir /root/src
|
||||||
VOLUME /root/app
|
|
||||||
|
|
||||||
ENTRYPOINT /root/startup.sh;
|
COPY ./startup.sh /root
|
||||||
|
COPY ./requirements.txt /root
|
||||||
|
COPY ./src/ /root/src/
|
||||||
|
|
||||||
|
RUN ls -la
|
||||||
|
|
||||||
|
VOLUME /root
|
||||||
|
|
||||||
|
ENTRYPOINT ["/bin/sh", "/root/startup.sh"]
|
||||||
|
|||||||
Regular → Executable
+3
-3
@@ -4,11 +4,11 @@
|
|||||||
|
|
||||||
if test -f ./requirements.txt
|
if test -f ./requirements.txt
|
||||||
then
|
then
|
||||||
pip install -r ./requirements.txt
|
python3 -m venv .venv
|
||||||
|
.venv/bin/pip install -r ./requirements.txt
|
||||||
else
|
else
|
||||||
printf "Missing requirements file! aborting...\n"
|
printf "Missing requirements file! aborting...\n"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
python3 ./src/scraper.py
|
.venv/bin/python3 src/scraper.py
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user