~metalune/public-inbox

[PATCH] Fix and clean the Docker deployment

TheFrenchGhosty <TheFrenchGhosty@posteo.is>
Details
Message ID
<29693e4c-8c19-9157-7d46-81a1ac6703b0@posteo.is>
DKIM signature
pass
Download raw message
---
  web/Dockerfile => Dockerfile        |  2 +-
  docker-compose.yml                  | 11 +++++++++++
  {web/uvicorn => uvicorn}/Dockerfile |  2 +-
  web/docker-compose.yml              | 13 -------------
  4 files changed, 13 insertions(+), 15 deletions(-)
  rename web/Dockerfile => Dockerfile (69%)
  create mode 100644 docker-compose.yml
  rename {web/uvicorn => uvicorn}/Dockerfile (71%)
  delete mode 100644 web/docker-compose.yml

diff --git a/web/Dockerfile b/Dockerfile
similarity index 69%
rename from web/Dockerfile
rename to Dockerfile
index 31b22cf..4a59073 100644
--- a/web/Dockerfile
+++ b/Dockerfile
@@ -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
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..7f1db65
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,11 @@
+version: "3.6"
+
+services:
+
+  simplytranslate:
+    build: .
+    container_name: simplytranslate
+    ports:
+      - "127.0.0.1:5000:5000"
+    volumes:
+      - "./config.conf:/etc/simplytranslate/web.conf"
diff --git a/web/uvicorn/Dockerfile b/uvicorn/Dockerfile
similarity index 71%
rename from web/uvicorn/Dockerfile
rename to uvicorn/Dockerfile
index d502178..fb1959f 100644
--- a/web/uvicorn/Dockerfile
+++ b/uvicorn/Dockerfile
@@ -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
diff --git a/web/docker-compose.yml b/web/docker-compose.yml
deleted file mode 100644
index c3b0e74..0000000
--- a/web/docker-compose.yml
+++ /dev/null
@@ -1,13 +0,0 @@
-version: "3.6"
-
-services:
-  simplytranslate:
-    build: .
-    container_name: "simplytranslate"
-    networks:
-      - egress
-    ports:
-      - "5000:5000"
-networks:
-  egress:
-    external: true
-- 
2.30.2
Reply to thread Export thread (mbox)