~metalune/simplytranslate_docker

4fc34e3503def3a8436dab4f84a1731070a715ba — FIGBERT 1 year, 2 days ago 2ba7a58
Add working general and uvicorn web Dockerfiles
2 files changed, 32 insertions(+), 0 deletions(-)

M web/Dockerfile
M web/uvicorn/Dockerfile
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"]