Browse Source

Add nginx

master
dave 7 years ago
parent
commit
d0dfee2531
  1. 14
      Dockerfile
  2. 17
      default
  3. 3
      nginx.conf

14
Dockerfile

@ -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

@ -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

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