Merge 809b83a73f
into 48c31836be
This commit is contained in:
commit
35c17666e6
4 changed files with 49 additions and 13 deletions
18
Dockerfile
18
Dockerfile
|
@ -1,22 +1,18 @@
|
|||
FROM nginx:1.9.12
|
||||
FROM nginx:alpine
|
||||
MAINTAINER Jason Wilder mail@jasonwilder.com
|
||||
|
||||
# Install wget and install/updates certificates
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y -q --no-install-recommends \
|
||||
RUN apk add --no-cache --virtual .run-deps \
|
||||
ca-certificates \
|
||||
wget \
|
||||
&& apt-get clean \
|
||||
&& rm -r /var/lib/apt/lists/*
|
||||
bash
|
||||
|
||||
# Configure Nginx and apply fix for very long server names
|
||||
RUN echo "daemon off;" >> /etc/nginx/nginx.conf \
|
||||
&& sed -i 's/^http {/&\n server_names_hash_bucket_size 128;/g' /etc/nginx/nginx.conf
|
||||
COPY nginx.conf /etc/nginx/
|
||||
RUN mkdir /etc/nginx/conf.d
|
||||
|
||||
# Install Forego
|
||||
ADD https://github.com/jwilder/forego/releases/download/v0.16.1/forego /usr/local/bin/forego
|
||||
RUN chmod u+x /usr/local/bin/forego
|
||||
|
||||
RUN wget https://github.com/jwilder/forego/releases/download/v0.16.1/forego -O /usr/local/bin/forego \
|
||||
&& chmod u+x /usr/local/bin/forego
|
||||
ENV DOCKER_GEN_VERSION 0.7.0
|
||||
|
||||
RUN wget https://github.com/jwilder/docker-gen/releases/download/$DOCKER_GEN_VERSION/docker-gen-linux-amd64-$DOCKER_GEN_VERSION.tar.gz \
|
||||
|
|
2
Makefile
2
Makefile
|
@ -3,7 +3,7 @@
|
|||
|
||||
update-dependencies:
|
||||
docker pull jwilder/docker-gen:0.7.0
|
||||
docker pull nginx:1.9.12
|
||||
docker pull nginx:alpine
|
||||
docker pull python:3
|
||||
docker pull rancher/socat-docker:latest
|
||||
docker pull appropriate/curl:latest
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
  [](https://circleci.com/gh/jwilder/nginx-proxy) [](https://travis-ci.org/jwilder/nginx-proxy)
|
||||
  [](https://circleci.com/gh/jwilder/nginx-proxy) [](https://travis-ci.org/jwilder/nginx-proxy)
|
||||
|
||||
nginx-proxy sets up a container running nginx and [docker-gen][1]. docker-gen generates reverse proxy configs for nginx and reloads nginx when containers are started and stopped.
|
||||
|
||||
|
|
40
nginx.conf
Normal file
40
nginx.conf
Normal file
|
@ -0,0 +1,40 @@
|
|||
|
||||
daemon off;
|
||||
|
||||
#user nobody;
|
||||
worker_processes 1;
|
||||
|
||||
#error_log logs/error.log;
|
||||
#error_log logs/error.log notice;
|
||||
#error_log logs/error.log info;
|
||||
|
||||
#pid logs/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
server_names_hash_bucket_size 128;
|
||||
|
||||
include 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 logs/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
|
||||
include conf.d/*.conf;
|
||||
}
|
Loading…
Reference in a new issue