Skip to content

Commit

Permalink
Fixes to work with most up-to-date nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgodbolt committed Mar 30, 2015
1 parent d90c27f commit 6960add
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 3 deletions.
58 changes: 58 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
user www-data;
worker_processes 1;
pid /run/nginx.pid;

events {
worker_connections 768;
# multi_accept on;
}

http {

##
# Basic Settings
##

sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /etc/nginx/mime.types;
default_type application/octet-stream;

##
# SSL Settings
##

ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
ssl_prefer_server_ciphers on;

##
# Logging Settings
##

access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;

##
# Gzip Settings
##

gzip on;
gzip_disable "msie6";

# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

include /etc/nginx/sites-enabled/*;
}
11 changes: 8 additions & 3 deletions run_site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ else
$SUDO docker pull mattgodbolt/gcc-explorer
fi

ALL="nginx gcc go gcc1204 d rust"
ALL="nginx gcc go gcc1204 dx rust"
$SUDO docker stop ${ALL} || true
$SUDO docker rm ${ALL} || true

Expand All @@ -30,7 +30,11 @@ start_and_wait() {
local PORT=$2
shift
shift
local FULL_COMMAND="${SUDO} docker run --name ${NAME} ${CFG} -d -p ${PORT}:${PORT} $* mattgodbolt/gcc-explorer:${NAME}"
local TAG=${NAME}
if [[ "${#NAME}" -eq 1 ]]; then
NAME="${NAME}x"
fi
local FULL_COMMAND="${SUDO} docker run --name ${NAME} ${CFG} -d -p ${PORT}:${PORT} $* mattgodbolt/gcc-explorer:${TAG}"
local CONTAINER_UID=""
for retries in $(seq 3); do
$SUDO docker stop ${NAME} || true
Expand Down Expand Up @@ -68,6 +72,7 @@ $SUDO docker run \
--volumes-from gcc \
-v /var/log/nginx:/var/log/nginx \
-v /home/ubuntu:/var/www:ro \
-v $(pwd)/nginx.conf:/etc/nginx/nginx.conf:ro \
-v $(pwd)/nginx:/etc/nginx/sites-enabled:ro \
--link gcc:gcc --link d:d --link rust:rust --link go:go \
--link gcc:gcc --link dx:d --link rust:rust --link go:go \
nginx

0 comments on commit 6960add

Please sign in to comment.