From 2ebfcd7fefb2b7c887950d3f7f03972ae8ecfea2 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 29 Oct 2022 11:31:06 -0500 Subject: [PATCH 1/3] Initial testing of running Node website in docker. --- Config/Hyperling.com/Dockerfile | 10 ++++++++++ Config/Hyperling.com/docker-compose.yml | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 Config/Hyperling.com/Dockerfile create mode 100644 Config/Hyperling.com/docker-compose.yml diff --git a/Config/Hyperling.com/Dockerfile b/Config/Hyperling.com/Dockerfile new file mode 100644 index 0000000..3fc99fc --- /dev/null +++ b/Config/Hyperling.com/Dockerfile @@ -0,0 +1,10 @@ +# 2022-10-29 Hyperling +# Create website in node container and run it. + +FROM node + +RUN git clone https://github.com/Hyperling/www www + +RUN apt update && apt install sudo + +RUN www/run.sh diff --git a/Config/Hyperling.com/docker-compose.yml b/Config/Hyperling.com/docker-compose.yml new file mode 100644 index 0000000..7f2db06 --- /dev/null +++ b/Config/Hyperling.com/docker-compose.yml @@ -0,0 +1,10 @@ +# Hyperling.com configuration. +# All that's needed in Node.js + +version: '2' + +services: + app: + image: node + restart: always + build: ./ From 39a92e1766250f83a709bb4a9589ef9e1e732bbd Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sat, 29 Oct 2022 11:47:35 -0500 Subject: [PATCH 2/3] Add sudo as a dependency. --- Config/Hyperling.com/Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Config/Hyperling.com/Dockerfile b/Config/Hyperling.com/Dockerfile index 3fc99fc..5c86335 100644 --- a/Config/Hyperling.com/Dockerfile +++ b/Config/Hyperling.com/Dockerfile @@ -3,8 +3,11 @@ FROM node -RUN git clone https://github.com/Hyperling/www www - +# Dependencies RUN apt update && apt install sudo +# Install website +RUN git clone https://github.com/Hyperling/www www + +# Run website RUN www/run.sh From 7e84373124952b085498e12bac7f5b7341c582f4 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Sun, 30 Oct 2022 08:05:41 -0500 Subject: [PATCH 3/3] Website is running correctly. --- Config/Hyperling.com/Dockerfile | 18 ++++++++++-------- Config/Hyperling.com/docker-compose.yml | 4 +++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Config/Hyperling.com/Dockerfile b/Config/Hyperling.com/Dockerfile index 5c86335..85ad7a5 100644 --- a/Config/Hyperling.com/Dockerfile +++ b/Config/Hyperling.com/Dockerfile @@ -1,13 +1,15 @@ # 2022-10-29 Hyperling # Create website in node container and run it. -FROM node +# Using Debian testing so that we use PHP >8. otherwise the shebangs from +# the include files (#!/usr/bin/php) show up on the website. +FROM debian:testing -# Dependencies -RUN apt update && apt install sudo +# Install Dependencies +RUN apt update && apt install -y sudo php-fpm nodejs npm -# Install website -RUN git clone https://github.com/Hyperling/www www - -# Run website -RUN www/run.sh +# Run Website +CMD rm -rfv www && \ + git clone https://github.com/Hyperling/www www && \ + cd www && \ + ./run.sh diff --git a/Config/Hyperling.com/docker-compose.yml b/Config/Hyperling.com/docker-compose.yml index 7f2db06..641b063 100644 --- a/Config/Hyperling.com/docker-compose.yml +++ b/Config/Hyperling.com/docker-compose.yml @@ -1,5 +1,5 @@ +# 2022-10-29 # Hyperling.com configuration. -# All that's needed in Node.js version: '2' @@ -8,3 +8,5 @@ services: image: node restart: always build: ./ + ports: + - 8317:8080