From 4c56bb2b755c207d50d0b8c264c27fdf9c34b58a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20P=C4=99dzich?= Date: Fri, 26 Jul 2024 16:36:36 +0200 Subject: [PATCH] Create Apache config and Dockerfile --- Dockerfile | 10 ++++++++++ httpd.conf | 12 ++++++++++++ netlify.toml | 12 ------------ 3 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 Dockerfile create mode 100644 httpd.conf delete mode 100644 netlify.toml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..69f080f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM node:lts-alpine AS build +WORKDIR /app +COPY . . +RUN npm i +RUN npm run build + +FROM httpd:2.4-alpine AS runtime +COPY --from=build /app/httpd.conf /usr/local/apache2/conf/httpd.conf +COPY --from=build /app/dist /usr/local/apache2/htdocs/ +EXPOSE 80 diff --git a/httpd.conf b/httpd.conf new file mode 100644 index 0000000..347aefc --- /dev/null +++ b/httpd.conf @@ -0,0 +1,12 @@ + + Options -MultiViews + + + + RewriteEngine On + RewriteBase / + RewriteRule ^index\.html$ - [L] + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule . /index.html [L] + diff --git a/netlify.toml b/netlify.toml deleted file mode 100644 index bceb843..0000000 --- a/netlify.toml +++ /dev/null @@ -1,12 +0,0 @@ -# example netlify.toml -[build] - command = "vite build" - functions = "netlify/functions" - publish = "dist" - -## Uncomment to use this redirect for Single Page Applications -## Not needed for static site generators. -[[redirects]] - from = "/*" - to = "/index.html" - status = 200 \ No newline at end of file