From e35b578120270a3493042b0931cda59c63b097d3 Mon Sep 17 00:00:00 2001 From: "Krzysztof R." Date: Sun, 12 May 2024 13:24:24 +0200 Subject: [PATCH] feat: make website actually display something --- Dockerfile | 20 ++++++++------------ index.html | 9 +++++++++ 2 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 index.html diff --git a/Dockerfile b/Dockerfile index 3cb976fb..ef351e2c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,11 @@ -FROM node:latest +# Use the official Nginx image from the Docker Hub +FROM nginx:alpine -# Create app directory -WORKDIR /usr/src/app +# Copy the static website file into the Nginx server directory +COPY index.html /usr/share/nginx/html/index.html -# Install app dependencies +# Expose port 80 +EXPOSE 80 -# If you also need http-server globally -RUN npm install -g http-server - -# Bundle app source -COPY . . - -EXPOSE 8080 -CMD ["http-server", "-p 8080"] +# Start Nginx and keep it running in the foreground +CMD ["nginx", "-g", "daemon off;"] diff --git a/index.html b/index.html new file mode 100644 index 00000000..d293229d --- /dev/null +++ b/index.html @@ -0,0 +1,9 @@ + + + + Hello World + + +

Hello world

+ +