2023-08-12 22:31:24 +02:00
|
|
|
# syntax=docker/dockerfile:1
|
|
|
|
|
|
|
|
FROM python:3.11-alpine
|
|
|
|
|
|
|
|
# Set working dir
|
|
|
|
WORKDIR /code
|
|
|
|
|
2023-08-12 22:54:12 +02:00
|
|
|
# Download git
|
2023-08-12 22:31:24 +02:00
|
|
|
RUN apk add git
|
2023-08-12 22:54:12 +02:00
|
|
|
|
|
|
|
# Download files
|
2023-08-12 22:31:24 +02:00
|
|
|
RUN git clone https://forgejo.vanten-s.com/vanten-s/vanten-s.com .
|
|
|
|
RUN git submodule update --init
|
|
|
|
|
2023-08-12 22:54:12 +02:00
|
|
|
# Get latest feeds
|
|
|
|
RUN git -C feed_articles pull origin main
|
|
|
|
|
|
|
|
# Install requirements
|
2023-08-12 22:31:24 +02:00
|
|
|
RUN pip3 install -r requirements.txt
|
|
|
|
|
2023-08-12 22:54:12 +02:00
|
|
|
# Allow us to access the server
|
|
|
|
EXPOSE 3000
|
|
|
|
|
|
|
|
# Run
|
2023-08-12 22:31:24 +02:00
|
|
|
CMD ["python3", "main.py", "&"]
|
|
|
|
|