M web/Dockerfile => web/Dockerfile +16 -0
@@ 0,0 1,16 @@
+FROM python:3-slim
+
+RUN apt update && apt upgrade && apt install -y git
+
+RUN git clone https://git.sr.ht/~metalune/simplytranslate_engines engines && \
+ git clone https://git.sr.ht/~metalune/simplytranslate_web web
+
+WORKDIR /engines
+RUN python3 setup.py install && \
+ pip install -r requirements.txt
+WORKDIR /web
+RUN pip install -r requirements.txt && \
+ pip install uvicorn
+
+EXPOSE 5000
+CMD ["python3", "main.py"]
M web/uvicorn/Dockerfile => web/uvicorn/Dockerfile +16 -0
@@ 0,0 1,16 @@
+FROM python:3-slim
+
+RUN apt update && apt upgrade && apt install -y git
+
+RUN git clone https://git.sr.ht/~metalune/simplytranslate_engines engines && \
+ git clone https://git.sr.ht/~metalune/simplytranslate_web web
+
+WORKDIR /engines
+RUN python3 setup.py install && \
+ pip install -r requirements.txt
+WORKDIR /web
+RUN pip install -r requirements.txt && \
+ pip install uvicorn
+
+EXPOSE 5000
+CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5000"]