Dockerize

This commit is contained in:
Jakob Kordež 2023-09-24 17:21:03 +02:00
parent 86df8de5c7
commit 5fb8b48eea
3 changed files with 34 additions and 0 deletions

6
.dockerignore Normal file
View File

@ -0,0 +1,6 @@
dist/
node_modules/
.gitignore
.prettierignore
Dockerfile
README.md

11
.htaccess Normal file
View File

@ -0,0 +1,11 @@
RewriteEngine On
# set the base URL prefix
RewriteBase /
# for requests for index.html, just respond with the file
RewriteRule ^index.html$ - [L]
# if requested path is not a valid filename, continue rewrite
RewriteCond %{REQUEST_FILENAME} !-f
# if requested path is not a valid directory, continue rewrite
RewriteCond %{REQUEST_FILENAME} !-d
# if you have continue to here, respond with index.html
RewriteRule . /index.html [L]

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM mcr.microsoft.com/playwright:v1.38.1 AS build
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY . .
RUN yarn build
FROM httpd:2.4-alpine
COPY --from=build /app/dist/ /usr/local/apache2/htdocs/
COPY .htaccess /usr/local/apache2/htdocs/.htaccess