adding sample docker file and nginx config

This commit is contained in:
Mohammad Naghavi 2016-02-11 22:17:49 +01:00
parent 7777c11584
commit 07528ab957
2 changed files with 40 additions and 0 deletions

12
Dockerfile Normal file
View file

@ -0,0 +1,12 @@
FROM nginx
MAINTAINER Mohammad Naghavi <mohamnag@gmail.com>
ADD default.conf /etc/nginx/conf.d/default.conf
ADD css/ /opt/www/file-browser/css/
ADD image/ /opt/www/file-browser/image/
ADD js/ /opt/www/file-browser/js/
ADD index.html /opt/www/file-browser/
VOLUME /opt/www/files/
EXPOSE 80

28
default.conf Normal file
View file

@ -0,0 +1,28 @@
server {
listen 80;
server_name localhost;
root /opt/www/;
index index.html index.htm;
location ~* (/javadoc)|(/tests) {
autoindex off;
}
location /files/ {
root /opt/www/; # will at the end serve /opt/www/files/
autoindex on;
autoindex_format json;
disable_symlinks off;
}
location / {
root /opt/www/file-browser/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}