mirror of
https://github.com/maciejpedzich/racemash.git
synced 2024-11-27 16:15:47 +01:00
Replace Apache with Nginx
This commit is contained in:
parent
4841f7f5b0
commit
f846efc226
@ -4,7 +4,8 @@ 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/
|
||||
FROM nginx:stable-alpine AS runtime
|
||||
COPY --from=build /app/nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
18
httpd.conf
18
httpd.conf
@ -1,18 +0,0 @@
|
||||
ServerName racemash.maciejpedzi.ch
|
||||
|
||||
LoadModule mpm_event_module modules/mod_mpm_event.so
|
||||
#LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
|
||||
#LoadModule mpm_worker_module modules/mod_mpm_worker.so
|
||||
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteBase /
|
||||
RewriteRule ^index\.html$ - [L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule . /index.html [L]
|
||||
</IfModule>
|
9
nginx/default.conf
Normal file
9
nginx/default.conf
Normal file
@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html index.htm;
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user