Skip to content

Commit

Permalink
Feat: nginx.conf, Procfile, webpack #165
Browse files Browse the repository at this point in the history
  • Loading branch information
mzeong committed Feb 18, 2024
1 parent 492a4d5 commit c541dfa
Show file tree
Hide file tree
Showing 5 changed files with 5,420 additions and 4,297 deletions.
55 changes: 55 additions & 0 deletions .platform/nignx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
user nginx;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
worker_processes auto;
worker_rlimit_nofile 33282;

events {
use epoll;
worker_connections 1024;
multi_accept on;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

include conf.d/*.conf;

map $http_upgrade $connection_upgrade {
default "upgrade";
}

upstream node {
server 127.0.0.1:3000;
keepalive 1024;
}

server {
listen 80 default_server;
listen [::]:80 default_server;

location / {
proxy_pass http://node;
proxy_http_version 1.1;
proxy_set_header Connection $connection_upgrade;
proxy_set_header Upgrade $http_upgrade;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

access_log /var/log/nginx/access.log main;

gzip off;
gzip_comp_level 4;

# Include the Elastic Beanstalk generated locations
include conf.d/elasticbeanstalk/healthd.conf;
}
}
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: npm ci & npm run start
Loading

0 comments on commit c541dfa

Please sign in to comment.