From 883fa960aacd6bd18dd96874c785871dab01f6ac Mon Sep 17 00:00:00 2001 From: Salaah Amin Date: Sun, 30 May 2021 22:38:14 +0100 Subject: [PATCH] added dockerfile. --- Dockerfile | 20 ++++++++++++++++++++ public/index.html | 34 +++++++++++++++++----------------- 2 files changed, 37 insertions(+), 17 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..710bdec --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM nginx:1.21 + +RUN apt update \ + && apt upgrade -y \ + && curl -sL https://deb.nodesource.com/setup_13.x | bash - \ + && apt-get install -y nodejs \ + && mkdir -p /app + +WORKDIR /app +COPY . . + +RUN npm install && npm audit fix +RUN npm run build +RUN ls -lrt +RUN mkdir -p /usr/share/nginx/html +RUN cp -a build/. /usr/share/nginx/html/ + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] diff --git a/public/index.html b/public/index.html index 46ca5ae..cb34587 100644 --- a/public/index.html +++ b/public/index.html @@ -2,7 +2,7 @@ - + @@ -14,7 +14,7 @@ - + @@ -28,81 +28,81 @@ - + Tetris