commit af19fbeb56d38186d5f2318e8123ca92f90cd683 Author: nicco Date: Sun Jul 1 10:35:40 2018 +0200 Server diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..127892a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3' + +services: + server: + image: nginx:alpine + restart: always + ports: + - 80:80 + volumes: + - ./:/srv + - ./nginx.conf:/etc/nginx/nginx.conf:ro \ No newline at end of file diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..d4032d7 --- /dev/null +++ b/dockerfile @@ -0,0 +1,2 @@ +FROM nginx:alpine + diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..160c7f4 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,36 @@ +user nginx; +worker_processes 1; + +error_log /var/log/nginx/error.log warn; +pid /var/run/nginx.pid; + +events { + worker_connections 1024; +} + +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"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + + keepalive_timeout 65; + + gzip on; + + server{ + listen 80; + server_name _; + + location / { + root /srv; + autoindex on; + } + } +} \ No newline at end of file