Skip to content

Commit

Permalink
build: nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
ddecrulle committed Dec 4, 2023
1 parent b9a74af commit 8bb6c82
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ jobs:
with:
name: dist
path: dist
- run: tar -cvf build.tar ./dist
- uses: docker/build-push-action@v4
with:
push: true
Expand Down
12 changes: 5 additions & 7 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
server {
listen 8080;
server_name /usr/share/nginx/html;
listen 8080 default_server;

root /usr/share/nginx/html;
index index.html;
index index.html;

location ~* \.(?:manifest|appcache|html?|xml|json)$ {
expires -1;
expires -1;
# access_log logs/static.log; # I don't usually include a static log
}

location ~* \.(?:css|js)$ {
try_files $uri =404;
expires 1y;
access_log off;
add_header Cache-Control "public";
access_log off;
}

# Any route containing a file extension (e.g. /devicesfile.js)
Expand All @@ -24,6 +22,6 @@ server {

# Any route that doesn't have a file extension (e.g. /devices)
location / {
try_files $uri $uri/ /index.html;
try_files $uri $uri/ /index.html;
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "knowledge",
"version": "1.11.5",
"version": "1.11.6",
"description": "The user interface that presents the service offer of the INSEE survey information system",
"author": "u/ddecrulle",
"license": "MIT",
Expand Down

0 comments on commit 8bb6c82

Please sign in to comment.