Client/Server changes
This commit is contained in:
@@ -56,4 +56,5 @@ RUN godot --headless --export-release "HTML5" build/web/index.html
|
|||||||
|
|
||||||
FROM nginx:1.27-alpine
|
FROM nginx:1.27-alpine
|
||||||
COPY --from=build /project/build/web/ /usr/share/nginx/html/
|
COPY --from=build /project/build/web/ /usr/share/nginx/html/
|
||||||
|
COPY nginx.default.conf /etc/nginx/conf.d/default.conf
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
etag on;
|
||||||
|
|
||||||
|
# The Godot web export uses stable filenames (index.js, index.wasm, index.pck).
|
||||||
|
# Force the browser to revalidate on each navigation so a new deployment is
|
||||||
|
# picked up without manually clearing the cache.
|
||||||
|
location = /index.html {
|
||||||
|
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
|
||||||
|
add_header Pragma "no-cache" always;
|
||||||
|
add_header Expires "0" always;
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~* \.(js|wasm|pck|png|jpg|jpeg|gif|svg|webp|json|txt|import)$ {
|
||||||
|
add_header Cache-Control "no-cache, max-age=0, must-revalidate" always;
|
||||||
|
add_header Pragma "no-cache" always;
|
||||||
|
add_header Expires "0" always;
|
||||||
|
try_files $uri =404;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
add_header Cache-Control "no-cache, max-age=0, must-revalidate" always;
|
||||||
|
add_header Pragma "no-cache" always;
|
||||||
|
add_header Expires "0" always;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user