-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
Rebase generic off monolithic
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
FROM lancachenet/ubuntu-nginx:latest | ||
MAINTAINER LanCache.Net Team <[email protected]> | ||
FROM lancachenet/monolithic:latest | ||
LABEL version=3 | ||
LABEL description="Single aggressive caching container for caching game content at LAN parties." | ||
LABEL maintainer="LanCache.Net Team <[email protected]>" | ||
|
||
ENV GENERICCACHE_VERSION=2 \ | ||
WEBUSER=www-data \ | ||
CACHE_MODE=generic \ | ||
CACHE_MEM_SIZE=500m \ | ||
CACHE_DISK_SIZE=1000000m \ | ||
|
@@ -15,19 +16,7 @@ ENV GENERICCACHE_VERSION=2 \ | |
|
||
COPY overlay/ / | ||
|
||
RUN rm /etc/nginx/sites-enabled/* /etc/nginx/stream-enabled/* ;\ | ||
rm /etc/nginx/conf.d/gzip.conf ;\ | ||
chmod 754 /var/log/tallylog ; \ | ||
id -u ${WEBUSER} &> /dev/null || adduser --system --home /var/www/ --no-create-home --shell /bin/false --group --disabled-login ${WEBUSER} ;\ | ||
chmod 755 /scripts/* ;\ | ||
mkdir -m 755 -p /data/cache ;\ | ||
mkdir -m 755 -p /data/info ;\ | ||
mkdir -m 755 -p /data/logs ;\ | ||
mkdir -m 755 -p /tmp/nginx/ ;\ | ||
chown -R ${WEBUSER}:${WEBUSER} /data/ ;\ | ||
mkdir -p /etc/nginx/sites-enabled ;\ | ||
ln -s /etc/nginx/sites-available/10_generic.conf /etc/nginx/sites-enabled/10_generic.conf; \ | ||
ln -s /etc/nginx/stream-available/10_sni.conf /etc/nginx/stream-enabled/10_sni.conf | ||
RUN rm -rf /data/cachedomains/* | ||
|
||
VOLUME ["/data/logs", "/data/cache", "/var/www"] | ||
|
||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#no maps needed in generic |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
# no maps needed |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
#!/bin/bash | ||
set -e | ||
pageload1=`curl http://www.lagado.com/tools/cache-test --resolve www.lagado.com:80:127.0.0.1` | ||
pageload1=`curl http://www.worldtimeapi.org/api/timezone/ETC/GMT --resolve www.worldtimeapi.org:80:127.0.0.1` | ||
sleep 5 | ||
pageload2=`curl http://www.lagado.com/tools/cache-test --resolve www.lagado.com:80:127.0.0.1` | ||
|
||
pageload2=`curl http://www.worldtimeapi.org/api/timezone/ETC/GMT --resolve www.worldtimeapi.org:80:127.0.0.1` | ||
sleep 5 | ||
pageload3=`curl http://worldtimeapi.org/api/timezone/ETC/GMT --resolve worldtimeapi.org:80:127.0.0.1` | ||
sleep 5 | ||
pageload4=`curl http://worldtimeapi.org/api/timezone/ETC/GMT --resolve worldtimeapi.org:80:127.0.0.1` | ||
if [ "$pageload1" == "$pageload2" ]; then | ||
echo "Succesfully Cached" | ||
exit 0 | ||
if [ "$pageload3" == "$pageload4" ]; then | ||
if [ "$pageload1" == "$pageload4" ]; then | ||
echo "Succesfully Cached" | ||
exit 0 | ||
else | ||
#In generic pages 1+4 should be identical as all domains are cached equally | ||
echo "Error caching test page, pages 1+4 are different" | ||
exit -3 | ||
fi | ||
|
||
else | ||
echo "Error caching test page, pages 3+4 different" | ||
exit -2 | ||
fi | ||
|
||
else | ||
echo "Error caching test page, pages differed" | ||
echo "Error caching test page, pages 1+2 different" | ||
exit -1 | ||
fi |