From af19fbeb56d38186d5f2318e8123ca92f90cd683 Mon Sep 17 00:00:00 2001 From: nicco Date: Sun, 1 Jul 2018 10:35:40 +0200 Subject: [PATCH] Server --- docker-compose.yml | 11 +++++++++++ dockerfile | 2 ++ nginx.conf | 36 ++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 docker-compose.yml create mode 100644 dockerfile create mode 100644 nginx.conf 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