Add nginx

This commit is contained in:
dave 2015-03-21 11:29:34 -07:00
parent dad2258164
commit d0dfee2531
3 changed files with 31 additions and 3 deletions

View File

@ -1,10 +1,18 @@
FROM basessh
MAINTAINER Dave P
# Create user
# Create nexus user
RUN useradd --create-home nexus ; \
echo "nexus:nexus" | chpasswd
COPY start /start
RUN chmod +x /start
# Install nginx
RUN apt-get install -y nginx-light
# Configure nginx
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
COPY nginx.conf /etc/supervisor/conf.d/nginx.conf
COPY default /etc/nginx/sites-available/default
EXPOSE 80

17
default Normal file
View File

@ -0,0 +1,17 @@
server {
listen 80 default_server;
#listen [::]:80 default_server ipv6only=on;
root /nexus/;
index index.html index.htm;
server_name localhost;
#auth_basic "Restricted";
#auth_basic_user_file /etc/nginx/htpasswd;
location / {
autoindex on;
try_files $uri $uri/ =404;
}
}

3
nginx.conf Normal file
View File

@ -0,0 +1,3 @@
[program:nginx]
command=/usr/sbin/nginx
autorestart=true