From 06c222c8a982a7418300b891f9ae8dd1a36899ce Mon Sep 17 00:00:00 2001 From: Clark Laughlin Date: Mon, 19 Oct 2015 16:07:44 -0400 Subject: reorg to pull out common revproxy container --- docker-pull-images | 1 - docker-start-containers | 17 +++++---------- lighttpd-static/Dockerfile | 15 -------------- lighttpd-static/docker-build-image | 4 ---- lighttpd-static/lighttpd.conf | 33 ------------------------------ tempest-lighttpd-static/Dockerfile | 15 ++++++++++++++ tempest-lighttpd-static/docker-build-image | 4 ++++ tempest-lighttpd-static/lighttpd.conf | 33 ++++++++++++++++++++++++++++++ 8 files changed, 57 insertions(+), 65 deletions(-) delete mode 100644 lighttpd-static/Dockerfile delete mode 100755 lighttpd-static/docker-build-image delete mode 100644 lighttpd-static/lighttpd.conf create mode 100644 tempest-lighttpd-static/Dockerfile create mode 100755 tempest-lighttpd-static/docker-build-image create mode 100644 tempest-lighttpd-static/lighttpd.conf diff --git a/docker-pull-images b/docker-pull-images index 13b8019..5b2c8d0 100755 --- a/docker-pull-images +++ b/docker-pull-images @@ -1,4 +1,3 @@ #!/bin/bash docker pull clarktlaugh/neo4j-docker-community -docker pull jwilder/nginx-proxy diff --git a/docker-start-containers b/docker-start-containers index 98cc444..03f24ca 100755 --- a/docker-start-containers +++ b/docker-start-containers @@ -6,7 +6,7 @@ DATA_DIR=/srv/tempest/data LOGS_DIR=/srv/tempest/logs/logs # start the neo4j container -docker run -d --name neo4j \ +docker run -d --name tempest-neo4j \ --privileged \ -p 127.0.0.1:7474:7474 \ -p 127.0.0.1:1337:1337 \ @@ -14,26 +14,19 @@ docker run -d --name neo4j \ -v ${DATA_DIR}:/var/lib/neo4j/data \ clarktlaugh/neo4j-docker-community -# start the reverse proxy -docker run -d --name reverse-proxy \ - -p 80:80 \ - --restart=always \ - -v /var/run/docker.sock:/tmp/docker.sock \ - jwilder/nginx-proxy - # start the static log web server container -docker run -d --name static-log-server \ +docker run -d --name tempest-static-log-server \ --privileged \ -p 127.0.0.1:8081:8080 \ --restart=always \ -e VIRTUAL_HOST=${STATIC_LOGS_VIRTUAL_HOST} \ -v ${LOGS_DIR}:/var/www \ - lighttpd-static + tempest-lighttpd-static # start the web-app container, linked to the neo4j container docker run -d --name tempest-ci-webapp \ - --link neo4j:neo4j \ - --link static-log-server:logs \ + --link tempest-neo4j:neo4j \ + --link tempest-static-log-server:logs \ -e VIRTUAL_HOST=${WEBAPP_VIRTUAL_HOST} \ -p 127.0.0.1:8080:8080 \ --restart=always \ diff --git a/lighttpd-static/Dockerfile b/lighttpd-static/Dockerfile deleted file mode 100644 index 3a1c084..0000000 --- a/lighttpd-static/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM gliderlabs/alpine:3.1 -MAINTAINER Clark Laughlin - -RUN apk add --update \ - lighttpd \ - && rm -rf /var/cache/apk/* - -ADD lighttpd.conf /etc/lighttpd/lighttpd.conf -RUN adduser www-data -G www-data -H -s /bin/false -D - -EXPOSE 8080 -VOLUME /var/www - -ENTRYPOINT ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"] - diff --git a/lighttpd-static/docker-build-image b/lighttpd-static/docker-build-image deleted file mode 100755 index 32b9fd4..0000000 --- a/lighttpd-static/docker-build-image +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -docker rmi lighttpd-static -docker build -t lighttpd-static . - diff --git a/lighttpd-static/lighttpd.conf b/lighttpd-static/lighttpd.conf deleted file mode 100644 index 3fe4b48..0000000 --- a/lighttpd-static/lighttpd.conf +++ /dev/null @@ -1,33 +0,0 @@ -# See /usr/share/doc/lighttpd - -server.port = 8080 -server.username = "www-data" -server.groupname = "www-data" -server.document-root = "/var/www" -server.errorlog = "/dev/stdout" -server.modules += ( "mod_setenv" ) -dir-listing.activate = "enable" -index-file.names = ( "index.html" ) -mimetype.assign = ( - ".html" => "text/html", - ".txt" => "text/plain", - ".log" => "text/plain", - ".json" => "text/plain", - ".css" => "text/css", - ".js" => "application/x-javascript", - ".jpg" => "image/jpeg", - ".jpeg" => "image/jpeg", - ".gif" => "image/gif", - ".png" => "image/png", - ".gz" => "text/plain", - "" => "application/octet-stream" - ) - -setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*") - -$HTTP["url"] =~ "\.gz$" { - setenv.add-response-header = ( "Content-Encoding" => "x-gzip" ) - compress.filetype = () - mimetype.assign = ("" => "text/plain") -} - diff --git a/tempest-lighttpd-static/Dockerfile b/tempest-lighttpd-static/Dockerfile new file mode 100644 index 0000000..3a1c084 --- /dev/null +++ b/tempest-lighttpd-static/Dockerfile @@ -0,0 +1,15 @@ +FROM gliderlabs/alpine:3.1 +MAINTAINER Clark Laughlin + +RUN apk add --update \ + lighttpd \ + && rm -rf /var/cache/apk/* + +ADD lighttpd.conf /etc/lighttpd/lighttpd.conf +RUN adduser www-data -G www-data -H -s /bin/false -D + +EXPOSE 8080 +VOLUME /var/www + +ENTRYPOINT ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"] + diff --git a/tempest-lighttpd-static/docker-build-image b/tempest-lighttpd-static/docker-build-image new file mode 100755 index 0000000..92cd825 --- /dev/null +++ b/tempest-lighttpd-static/docker-build-image @@ -0,0 +1,4 @@ +#!/bin/bash +docker rmi tempest-lighttpd-static +docker build -t tempest-lighttpd-static . + diff --git a/tempest-lighttpd-static/lighttpd.conf b/tempest-lighttpd-static/lighttpd.conf new file mode 100644 index 0000000..3fe4b48 --- /dev/null +++ b/tempest-lighttpd-static/lighttpd.conf @@ -0,0 +1,33 @@ +# See /usr/share/doc/lighttpd + +server.port = 8080 +server.username = "www-data" +server.groupname = "www-data" +server.document-root = "/var/www" +server.errorlog = "/dev/stdout" +server.modules += ( "mod_setenv" ) +dir-listing.activate = "enable" +index-file.names = ( "index.html" ) +mimetype.assign = ( + ".html" => "text/html", + ".txt" => "text/plain", + ".log" => "text/plain", + ".json" => "text/plain", + ".css" => "text/css", + ".js" => "application/x-javascript", + ".jpg" => "image/jpeg", + ".jpeg" => "image/jpeg", + ".gif" => "image/gif", + ".png" => "image/png", + ".gz" => "text/plain", + "" => "application/octet-stream" + ) + +setenv.add-response-header = ( "Access-Control-Allow-Origin" => "*") + +$HTTP["url"] =~ "\.gz$" { + setenv.add-response-header = ( "Content-Encoding" => "x-gzip" ) + compress.filetype = () + mimetype.assign = ("" => "text/plain") +} + -- cgit v1.2.3