Add files required for deployment
This commit is contained in:
@@ -0,0 +1,9 @@
|
|||||||
|
FROM nginx:alpine
|
||||||
|
|
||||||
|
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||||
|
COPY ./ /usr/share/nginx/html
|
||||||
|
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
# Alle HTML-Seiten
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Assets (CSS, JS, Bilder)
|
||||||
|
location /assets/ {
|
||||||
|
alias /usr/share/nginx/html/assets/;
|
||||||
|
try_files $uri =404;
|
||||||
|
autoindex off;
|
||||||
|
access_log off;
|
||||||
|
expires 7d; # optional: Browser-Cache für Assets
|
||||||
|
}
|
||||||
|
|
||||||
|
# Optional: Media/Uploads
|
||||||
|
location /media/ {
|
||||||
|
alias /usr/share/nginx/html/media/;
|
||||||
|
try_files $uri =404;
|
||||||
|
access_log off;
|
||||||
|
expires 7d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user