From 8128b1771369c09020c42fe95b996189f4ffae6f Mon Sep 17 00:00:00 2001
From: Jose Quintana <1700322+joseluisq@users.noreply.github.com>
Date: Thu, 8 Jul 2021 13:29:41 +0200
Subject: [PATCH] Merge pull request #48 from joseluisq/feature/move_public_to_docker_dir
refactor: move `./public` to `./docker` directory
---
docker/alpine/Dockerfile | 2 +-
docker/public/404.html | 9 +++++++++
docker/public/50x.html | 9 +++++++++
docker/public/assets/favicon.ico | Bin 0 -> 23229 bytes
docker/public/assets/main.css | 15 +++++++++++++++
docker/public/assets/main.js | 1 +
docker/public/index.html | 15 +++++++++++++++
docker/scratch/Dockerfile | 2 +-
public/404.html | 9 ---------
public/50x.html | 9 ---------
public/assets/favicon.ico | Bin 23229 -> 0 bytes
public/assets/main.css | 15 ---------------
public/assets/main.js | 1 -
public/index.html | 15 ---------------
sample.env | 2 +-
15 files changed, 52 insertions(+), 52 deletions(-)
create mode 100644 docker/public/404.html
create mode 100644 docker/public/50x.html
create mode 100644 docker/public/assets/favicon.ico
create mode 100644 docker/public/assets/main.css
create mode 100644 docker/public/assets/main.js
create mode 100644 docker/public/index.html
delete mode 100644 public/404.html
delete mode 100644 public/50x.html
delete mode 100644 public/assets/favicon.ico
delete mode 100644 public/assets/main.css
delete mode 100644 public/assets/main.js
delete mode 100644 public/index.html
diff --git a/docker/alpine/Dockerfile b/docker/alpine/Dockerfile
index e88d407..e45084a 100644
--- a/docker/alpine/Dockerfile
+++ b/docker/alpine/Dockerfile
@@ -16,7 +16,7 @@ RUN set -ex; \
chmod +x /usr/local/bin/static-web-server
COPY ./docker/alpine/entrypoint.sh /
-COPY ./public /public
+COPY ./docker/public /public
EXPOSE 80
VOLUME ["/public"]
diff --git a/docker/public/404.html b/docker/public/404.html
new file mode 100644
index 0000000..d339d77
--- /dev/null
+++ b/docker/public/404.html
@@ -0,0 +1,9 @@
+
+
+
+404 Content was not found
+
+
+404 Content was not found
+
+
diff --git a/docker/public/50x.html b/docker/public/50x.html
new file mode 100644
index 0000000..9a20203
--- /dev/null
+++ b/docker/public/50x.html
@@ -0,0 +1,9 @@
+
+
+
+50x Service Unavailable
+
+
+50x Service Unavailable
+
+
diff --git a/docker/public/assets/favicon.ico b/docker/public/assets/favicon.ico
new file mode 100644
index 0000000..b8ad237
Binary files /dev/null and b/docker/public/assets/favicon.ico differ
diff --git a/docker/public/assets/main.css b/docker/public/assets/main.css
new file mode 100644
index 0000000..cc34e89
--- /dev/null
+++ b/docker/public/assets/main.css
@@ -0,0 +1,15 @@
+body {
+ font-family: sans-serif;
+ color: black;
+ text-align: center;
+ font-size: 1.2rem;
+}
+
+h1 a {
+ text-decoration: none;
+ color: black;
+}
+
+a {
+ color: #0366d6;
+}
diff --git a/docker/public/assets/main.js b/docker/public/assets/main.js
new file mode 100644
index 0000000..fecd9f2
--- /dev/null
+++ b/docker/public/assets/main.js
@@ -0,0 +1 @@
+(() => console.log("Static Web Server running!"))()
diff --git a/docker/public/index.html b/docker/public/index.html
new file mode 100644
index 0000000..dd87f3e
--- /dev/null
+++ b/docker/public/index.html
@@ -0,0 +1,15 @@
+
+
+
+
+ Static Web Server
+
+
+
+
+ Static Web Server
+ A blazing fast static files-serving web server powered by Rust.
+ View on GitHub
+
+
+
diff --git a/docker/scratch/Dockerfile b/docker/scratch/Dockerfile
index 0e9728f..758e965 100644
--- a/docker/scratch/Dockerfile
+++ b/docker/scratch/Dockerfile
@@ -12,7 +12,7 @@ LABEL version="${SERVER_VERSION}" \
maintainer="Jose Quintana "
COPY --from=latest /usr/local/bin/static-web-server /
-COPY ./public /public
+COPY ./docker/public /public
EXPOSE 80
VOLUME ["/public"]
diff --git a/public/404.html b/public/404.html
deleted file mode 100644
index d339d77..0000000
--- a/public/404.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-404 Content was not found
-
-
-404 Content was not found
-
-
diff --git a/public/50x.html b/public/50x.html
deleted file mode 100644
index 9a20203..0000000
--- a/public/50x.html
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-50x Service Unavailable
-
-
-50x Service Unavailable
-
-
diff --git a/public/assets/favicon.ico b/public/assets/favicon.ico
deleted file mode 100644
index b8ad237..0000000
Binary files a/public/assets/favicon.ico and /dev/null differ
diff --git a/public/assets/main.css b/public/assets/main.css
deleted file mode 100644
index cc34e89..0000000
--- a/public/assets/main.css
+++ /dev/null
@@ -1,15 +0,0 @@
-body {
- font-family: sans-serif;
- color: black;
- text-align: center;
- font-size: 1.2rem;
-}
-
-h1 a {
- text-decoration: none;
- color: black;
-}
-
-a {
- color: #0366d6;
-}
diff --git a/public/assets/main.js b/public/assets/main.js
deleted file mode 100644
index fecd9f2..0000000
--- a/public/assets/main.js
+++ /dev/null
@@ -1 +0,0 @@
-(() => console.log("Static Web Server running!"))()
diff --git a/public/index.html b/public/index.html
deleted file mode 100644
index dd87f3e..0000000
--- a/public/index.html
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
- Static Web Server
-
-
-
-
- Static Web Server
- A blazing fast static files-serving web server powered by Rust.
- View on GitHub
-
-
-
diff --git a/sample.env b/sample.env
index 8b9a409..b5e3be0 100644
--- a/sample.env
+++ b/sample.env
@@ -3,7 +3,7 @@ E_ARGS = "--port=8787"
# Server configuration
SERVER_LOG_LEVEL = "trace"
-SERVER_ROOT = "public"
+SERVER_ROOT = "docker/public"
# SERVER_PORT = 8787
SERVER_COMPRESSION = true
SERVER_DIRECTORY_LISTING = true
--
libgit2 1.7.2