From 1656656af1c04ec8f2b7440ec239d359d6dbb31c Mon Sep 17 00:00:00 2001 From: xgaia Date: Thu, 8 Jul 2021 10:55:49 +0200 Subject: [PATCH] add Dockerfile --- .dockerignore | 4 ++++ Dockerfile | 4 ++++ nginx.conf | 15 +++++++++++++++ 3 files changed, 23 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 nginx.conf diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c5dae5e --- /dev/null +++ b/.dockerignore @@ -0,0 +1,4 @@ +README.md +yarn.lock +package.json +LICENSE diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2744779 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,4 @@ +FROM nginx:1.19.1-alpine + +COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY . /usr/share/nginx/html diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..7925f5f --- /dev/null +++ b/nginx.conf @@ -0,0 +1,15 @@ +server { + listen 80; + server_name localhost; + # Website + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri $uri/ /index.html; + } + # Error page + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +}