Skip to content

Commit

Permalink
Add resolver and proxy timeout settings in nginx.conf.template, order…
Browse files Browse the repository at this point in the history
… games by created date and id in GamesDao, and add a catch-all route in UPAC.tsx
  • Loading branch information
alexwaeseperlman committed Jan 2, 2024
1 parent 9651c80 commit 114ef80
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
12 changes: 10 additions & 2 deletions nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,27 @@ http {
}

server {
resolver 127.0.0.11 ipv6=off;

listen 443 ssl;

ssl_certificate /etc/letsencrypt/live/DOMAIN_NAME/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/DOMAIN_NAME/privkey.pem;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

location / {
set $target http://website:3000;
proxy_pass $target;
proxy_pass $target$request_uri;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 300s;
proxy_connect_timeout 75s;
}

location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
}

Expand Down
2 changes: 1 addition & 1 deletion shared/src/db/dao/games.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl GamesDao for PgConnection {
use schema_aliases::*;

let mut base = games::table
.order_by(games::dsl::created.desc())
.order_by((games::dsl::created.desc(), games::dsl::id.desc()))
.inner_join(
defender_bots.on(games::dsl::defender.eq(defender_bots.field(bots::dsl::id))),
)
Expand Down
1 change: 1 addition & 0 deletions website/app/src/UPAC.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export default function UPAC() {
<Route path="view-game">
<Route path=":gameId" element={<GameDashboard />} />
</Route>
<Route path="*" element={<NotFound />} />
</Route>
</Routes>
</ErrorBoundary>
Expand Down

0 comments on commit 114ef80

Please sign in to comment.