Fix and clean the Docker deployment

Co-authored-by: TheFrenchGhosty <TheFrenchGhosty@posteo.is>
pull/4/head
Austin Huang 1 year ago committed by metalune
parent cd86f0a344
commit 66674e0116

@ -1,6 +1,6 @@
FROM python:3-slim
RUN apt update && apt upgrade && apt install -y git
RUN apt update && apt upgrade && apt install -y git automake libtool g++-multilib-i686-linux-gnu zlib1g-dev build-essential gcc g++ libxml2 libxml2-dev libxslt1.1 libxslt1-dev
RUN git clone https://git.sr.ht/~metalune/simplytranslate_engines engines && \
git clone https://git.sr.ht/~metalune/simplytranslate_web web
@ -9,8 +9,7 @@ WORKDIR /engines
RUN python3 setup.py install && \
pip install -r requirements.txt
WORKDIR /web
RUN pip install -r requirements.txt && \
pip install uvicorn
RUN pip install -r requirements.txt
EXPOSE 5000
CMD ["python3", "main.py"]

@ -0,0 +1,27 @@
# This is an example configuration file. It can be either
# /etc/simplytranslate/web.conf or /etc/simplytranslate/shared.conf (this one
# is also used by other frontends, like the Gemini frontend). In case of
# duplicate keys between files, the key in `gemini.conf` takes precedence.
[libre]
# LibreTranslate is disabled by default. If it is enabled, `Instance` is required.
Enabled = False
Instance = https://libretranslate.com
# Not all instances need an API key; if the one you use don't, remove this
# line.
ApiKey = [REDACTED]
[google]
# Google translate is enabled by default.
Enabled = True
[deepl]
Enabled = False
[iciba]
# ICIBA Translate (a.k.a. PowerWord) is disabled by default.
Enabled = True
[network]
port = 5000
host = 0.0.0.0

@ -3,11 +3,8 @@ version: "3.6"
services:
simplytranslate:
build: .
container_name: "simplytranslate"
networks:
- egress
container_name: simplytranslate
ports:
- "5000:5000"
networks:
egress:
external: true
- "127.0.0.1:5000:5000"
volumes:
- "./config.conf:/etc/simplytranslate/web.conf"

@ -1,6 +1,6 @@
FROM python:3-slim
RUN apt update && apt upgrade && apt install -y git
RUN apt update && apt upgrade && apt install -y git automake libtool g++-multilib zlib1g-dev build-essential gcc g++ libxml2 libxml2-dev libxslt1.1 libxslt1-dev
RUN git clone https://git.sr.ht/~metalune/simplytranslate_engines engines && \
git clone https://git.sr.ht/~metalune/simplytranslate_web web

Loading…
Cancel
Save