From 1d4bc15bb4ba7f0d839b073266d0cf765981b841 Mon Sep 17 00:00:00 2001 From: ilbuonmarcio Date: Sun, 20 Aug 2023 23:57:42 +0200 Subject: [PATCH 1/2] Added Docker support for server deployment --- Dockerfile | 5 +++++ README.md | 7 +++++++ docker-compose.yml | 7 +++++++ 3 files changed, 19 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..755da63 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM ubuntu:22.04 +RUN apt update && apt upgrade -y && apt install python3 -y +WORKDIR /srv +COPY ./* ./ +CMD ["python3", "-m", "http.server", "5000"] diff --git a/README.md b/README.md index 6541beb..e48f4ce 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,13 @@ Installation ---- Just open `index.html` and that's it! There is no server code. Is that so simple? Yes! +Alternative Installation, using Docker, for server deployment +---- +- Clone the repository at your desired location +- Run `docker compose build` for building the container +- Run `docker compose up -d` for running the container +- Go to `https://127.0.0.1:9500` to use it! + Usage ---- diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..ff0b8c2 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: "3" +services: + web: + build: . + ports: + - "9500:5000" + restart: unless-stopped \ No newline at end of file From d306ffe85bb24f278ee05cd3ad6b2bd12c76ad73 Mon Sep 17 00:00:00 2001 From: ilbuonmarcio Date: Mon, 21 Aug 2023 00:10:29 +0200 Subject: [PATCH 2/2] Fixed typo on README file url --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e48f4ce..986359f 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ Alternative Installation, using Docker, for server deployment - Clone the repository at your desired location - Run `docker compose build` for building the container - Run `docker compose up -d` for running the container -- Go to `https://127.0.0.1:9500` to use it! +- Go to `http://127.0.0.1:9500` to use it! Usage ----