[PATCH simplytranslate_docker] Add working general and uvicorn web Dockerfiles
Export this patch
---
web/Dockerfile | 16 ++++++++++++++++
web/uvicorn/Dockerfile | 16 ++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/web/Dockerfile b/web/Dockerfile
index e69de29..31b22cf 100644
--- a/web/Dockerfile
+++ b/web/Dockerfile
@@ -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"]
diff --git a/web/uvicorn/Dockerfile b/web/uvicorn/Dockerfile
index e69de29..d502178 100644
--- a/web/uvicorn/Dockerfile
+++ b/web/uvicorn/Dockerfile
@@ -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"]
--
2.32.0
Thank you a lot o7