Skip to content

Commit

Permalink
Add simple production grade server
Browse files Browse the repository at this point in the history
  • Loading branch information
RealOrangeOne committed Feb 27, 2020
1 parent 8461661 commit 4c71498
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
5 changes: 5 additions & 0 deletions prod/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM nginx:stable-alpine

COPY prod/nginx.conf /etc/nginx/nginx.conf

COPY site/ /usr/share/nginx/html
42 changes: 42 additions & 0 deletions prod/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
user nginx;
worker_processes auto;

error_log stderr;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


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

access_log /dev/stdout;

sendfile on;

keepalive_timeout 65;

gzip on;

server {
listen 80;
server_name localhost;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
}

error_page 404 /404.html;

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

}

0 comments on commit 4c71498

Please sign in to comment.