From 66d59073b0a1182a791279aa054873296c5c07bc Mon Sep 17 00:00:00 2001 From: Jason Williams Date: Thu, 9 Jan 2025 08:36:17 -0700 Subject: [PATCH] Transition from busybox httpd to nginx --- Dockerfile | 3 +++ captain-definition | 6 +----- httpd.conf | 1 - local-test.sh | 4 ++++ local-test/Dockerfile | 3 --- local-test/start-server.sh | 6 ------ nginx.conf | 8 ++++++++ 7 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 Dockerfile delete mode 100644 httpd.conf create mode 100644 local-test.sh delete mode 100644 local-test/Dockerfile delete mode 100644 local-test/start-server.sh create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..99f2415 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM docker.io/nginx:1-alpine +COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY ./www /www \ No newline at end of file diff --git a/captain-definition b/captain-definition index 7e4c335..e1f1357 100644 --- a/captain-definition +++ b/captain-definition @@ -1,8 +1,4 @@ { "schemaVersion": 2, - "dockerfileLines": [ - "FROM lipanski/docker-static-website", - "COPY httpd.conf httpd.conf", - "COPY ./www /www" - ] + "deckerfilePath": "./Dockerfile" } \ No newline at end of file diff --git a/httpd.conf b/httpd.conf deleted file mode 100644 index d88867d..0000000 --- a/httpd.conf +++ /dev/null @@ -1 +0,0 @@ -H:/www \ No newline at end of file diff --git a/local-test.sh b/local-test.sh new file mode 100644 index 0000000..2556f96 --- /dev/null +++ b/local-test.sh @@ -0,0 +1,4 @@ +# Script used to spin up a local webserver for development & testing + +#!/bin/bash +podman run -it --rm -p 3000:80 $(podman build -q .) \ No newline at end of file diff --git a/local-test/Dockerfile b/local-test/Dockerfile deleted file mode 100644 index 3677885..0000000 --- a/local-test/Dockerfile +++ /dev/null @@ -1,3 +0,0 @@ -FROM docker.io/lipanski/docker-static-website -COPY httpd.conf httpd.conf -COPY ./www /www \ No newline at end of file diff --git a/local-test/start-server.sh b/local-test/start-server.sh deleted file mode 100644 index 0d67568..0000000 --- a/local-test/start-server.sh +++ /dev/null @@ -1,6 +0,0 @@ -# Script used to spin up a local webserver for development - -#!/bin/bash -CURR_DIR="$(pwd)" -cd ${PWD}/.. -podman run -it --rm --init -p 3000:3000 $(podman build -q -f ./local-test/Dockerfile .) \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..b9e0b4c --- /dev/null +++ b/nginx.conf @@ -0,0 +1,8 @@ +server { + listen 80; + root /www; + + location / { + index index.html; + } +} \ No newline at end of file