This commit is contained in:
vanten-s 2023-08-12 22:54:12 +02:00
parent ab37fe1eee
commit ea85ea20ec
Signed by: vanten-s
GPG key ID: DE3060396884D3F2
2 changed files with 19 additions and 0 deletions

View file

@ -5,11 +5,22 @@ FROM python:3.11-alpine
# Set working dir
WORKDIR /code
# Download git
RUN apk add git
# Download files
RUN git clone https://forgejo.vanten-s.com/vanten-s/vanten-s.com .
RUN git submodule update --init
# Get latest feeds
RUN git -C feed_articles pull origin main
# Install requirements
RUN pip3 install -r requirements.txt
# Allow us to access the server
EXPOSE 3000
# Run
CMD ["python3", "main.py", "&"]

8
pull.py Normal file
View file

@ -0,0 +1,8 @@
import os
import time
os.chdir("feed_articles")
while True:
time.sleep(100)
os.system("git pull")