Skip to content

Commit

Permalink
slightly better nginx reload?
Browse files Browse the repository at this point in the history
  • Loading branch information
seanhess committed Dec 16, 2024
1 parent f215d6b commit 654a0e3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
21 changes: 20 additions & 1 deletion deps/nginx.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
server {
listen 443 ssl;
server_name localhost;
# resolver 8.8.8.8 ipv6=off;

ssl_certificate /etc/nginx/certs/localhost.pem;
ssl_certificate_key /etc/nginx/certs/localhost-key.pem;
Expand All @@ -16,9 +17,27 @@ server {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_cache_bypass $http_upgrade;

proxy_next_upstream error timeout http_502 http_503 http_504 non_idempotent;
proxy_next_upstream_timeout 20s;
proxy_next_upstream_tries 10;

# Local Deveopment
keepalive_timeout 0; # when developing - prevent reload delay
keepalive_timeout 0s; # when developing - prevent reload delay

# None of these are working
# proxy_connect_timeout 1s; # Reduce the timeout for connecting to the backend
# proxy_read_timeout 1s; # Set the read timeout from the upstream
# proxy_send_timeout 1s; # Set the send timeout to the upstream

# proxy_ssl_verify off;

}

# Health check endpoint for liveness
# location /health {
# proxy_pass http://host.docker.internal:3033/health;
# proxy_set_header Host $host;
# }
}
7 changes: 1 addition & 6 deletions src/NSO/Metadata.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@

module NSO.Metadata where

import Data.Aeson (FromJSON (..), withText)
import Data.Aeson (FromJSON (..))
import Data.ByteString.Lazy.Char8 (ByteString)
import Data.ByteString.Lazy.Char8 qualified as L
import Data.Text (unpack)
import Data.Time.Format (FormatTime)
import Data.Time.Format.ISO8601
import Effectful
import Effectful.Dispatch.Dynamic
import Effectful.GraphQL
Expand Down Expand Up @@ -56,8 +53,6 @@ mockRequest _ r = do
op -> fail $ "GraphQL Request not mocked: " <> cs op




data DatasetInventory = DatasetInventory
-- { asdfObjectKey :: Text
-- , averageDatasetSpatialSampling :: Double
Expand Down

0 comments on commit 654a0e3

Please sign in to comment.