Skip to content

Commit

Permalink
Add example of Nginx configuration and healthcheck for a static React…
Browse files Browse the repository at this point in the history
…JS application
  • Loading branch information
wpjunior committed Dec 3, 2024
1 parent 3191839 commit 8552eab
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
33 changes: 33 additions & 0 deletions examples/static-reactjs/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
worker_processes 4;
pid /var/lib/nginx/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
error_log stderr;

events {
worker_connections 1024;
}

http {
include mime.types;
default_type application/octet-stream;
types_hash_max_size 2048;
server_tokens off;

sendfile on;

keepalive_timeout 65;
access_log /dev/stdout;

server {
listen 8888;
server_name localhost;

port_in_redirect off;

location / {
root /home/application/current;
index index.html index.htm;
try_files $uri $uri/ $uri.html /index.html;
}
}
}
2 changes: 2 additions & 0 deletions examples/static-reactjs/tsuru.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
healthcheck:
path: /

0 comments on commit 8552eab

Please sign in to comment.