-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
75 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
npm run pre-push | ||
sh deploy.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
docker buildx build --platform linux/arm64 --load -t verekia/manapotion . | ||
docker save -o /tmp/manapotion.tar verekia/manapotion | ||
scp /tmp/manapotion.tar midgar:/tmp/ | ||
ssh midgar docker load --input /tmp/manapotion.tar | ||
ssh midgar docker compose up -d manapotion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# v2 | ||
|
||
server { | ||
root /usr/share/nginx/html; | ||
index index.html; | ||
|
||
# Preserves port in redirects | ||
absolute_redirect off; | ||
|
||
# Gzip | ||
gzip on; | ||
gzip_types text/plain text/css application/javascript application/json image/svg+xml; | ||
gzip_min_length 1000; | ||
gzip_comp_level 6; | ||
|
||
# Security headers | ||
add_header X-Content-Type-Options nosniff; | ||
add_header X-Frame-Options SAMEORIGIN; | ||
add_header X-XSS-Protection "1; mode=block"; | ||
|
||
# Remove trailing slashes | ||
rewrite ^/(.*)/$ /$1 permanent; | ||
|
||
# Redirect /index and /index.html to / | ||
rewrite ^/index\.html$ / permanent; | ||
rewrite ^/index$ / permanent; | ||
|
||
# Redirect index.html to the path itself | ||
rewrite ^/(.*)/index\.html$ /$1 permanent; | ||
|
||
# Remove .html extension - except 404.html | ||
rewrite ^/(?!404)(.+)\.html$ /$1 permanent; | ||
|
||
location /.well-known/acme-challenge/ { | ||
set $traefik_host traefik; | ||
if ($hostname ~ "localhost") { | ||
set $traefik_host 127.0.0.1:8080; # Fallback for local development | ||
} | ||
proxy_pass http://$traefik_host; | ||
proxy_set_header Host $host; | ||
} | ||
|
||
location / { | ||
try_files $uri $uri.html $uri/index.html =404; | ||
} | ||
|
||
error_page 404 /404.html; | ||
|
||
location = /404.html { | ||
internal; | ||
} | ||
|
||
location = /404 { | ||
internal; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters