-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rebase generic off monolithic #112
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
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:switcheroo | ||
LABEL version=3 | ||
LABEL description="Single agressive caching container for caching game content at lan parties." | ||
VibroAxe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
LABEL maintainer=" LanCache.Net Team <[email protected]>" | ||
VibroAxe marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One option to make this more flexible:
We could potentially leverage the current branch name with this (e.g. attempt to pull
lancachenet/monolithic:$GITHUB_HEAD_REF
, if that works then pass--build-arg MONOLITHIC_TAG="${GITHUB_HEAD_REF}"
when building the image; this would allow automatically leveraging matched-name branches onmonolithic
for pull requests ongeneric
).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this, but don't want to make the change now