Auto-Commit: 2026-09-06 20:51:06
This commit is contained in:
1 parent
3a5d225829
commit
57b5527d03
3 files changed
+63
No files matched your search
@@ -0,0 +1,10 @@
|
||||
.git
|
||||
.gitignore
|
||||
*.ps1
|
||||
ilias-babz-bund.txt
|
||||
README.md
|
||||
*.tmp
|
||||
*.log
|
||||
.venv
|
||||
venv
|
||||
scratch
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
FROM nginx:alpine
|
||||
|
||||
# Custom Nginx configuration with Articulate Storyline MIME and caching support
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Fallback htpasswd file (in production overridden via volume mount)
|
||||
RUN touch /etc/nginx/.htpasswd
|
||||
|
||||
# Copy static website assets
|
||||
COPY index.html fw-logo.png /usr/share/nginx/html/
|
||||
COPY Documents/ /usr/share/nginx/html/Documents/
|
||||
COPY Trainings/ /usr/share/nginx/html/Trainings/
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
server {
|
||||
listen 80;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
charset utf-8;
|
||||
|
||||
# Correct MIME types — critical for Articulate Storyline .js bundles
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
# Protect Modul 6 with password
|
||||
location ~* ^/Trainings/WBT_ErkW_6_Administration_erw_Funktionen(_Internet)?/ {
|
||||
auth_basic "Administration Area";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd;
|
||||
try_files $uri $uri/ =404;
|
||||
|
||||
# Cache static assets inside the protected directory
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|svg|woff|woff2|ttf|mp3|mp4)$ {
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
}
|
||||
|
||||
# Cache static assets aggressively (course files never change after deploy)
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|svg|woff|woff2|ttf|mp3|mp4)$ {
|
||||
expires 30d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user