-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hugo Gomes
committed
Apr 19, 2023
1 parent
2f6df74
commit 17c17e7
Showing
3 changed files
with
24 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,23 +6,23 @@ LABEL maintainer="Platforme <[email protected]>" | |
EXPOSE 80 | ||
EXPOSE 443 | ||
|
||
ARG SERVER_NAME=localhost | ||
ARG PROXY_PROTO=https:// | ||
ARG PROXY_HOST=app.platforme.com | ||
ARG VARNISH_MODULES_VERSION=0.17.1 | ||
ARG VARNISH_MODULES_SHA512SUM=c05c3e9d560b319b1eb1ca03bb3626989ed92c7d8d8eeb3f895b0a8f69639e9497403c1797a7936c4a7819c08f36e9cbf32b7e60661bfd584aeed174822a6565 | ||
ARG VARNISH_MODULES_QUERYFILTER_VERSION=1.0.1 | ||
ARG VARNISH_MODULES_QUERYFILTER_SHA512SUM=6c3178d656dfffa7f515afc5d01e00d86b4149e9e61e8024b524e04a427cf3875a918f03999a9bbf4e762ec684d8d193aa03b8d36c1291a825834905802ecc32 | ||
ARG TOOLBOX_COMMIT=96bab07cf58b6e04824ffec608199f1780ff0d04 | ||
|
||
ENV VARNISH_SIZE 1G | ||
ENV SERVER_NAME=localhost | ||
ENV PROXY_PROTO=https:// | ||
ENV PROXY_HOST=app.platforme.com | ||
ENV VARNISH_SIZE=1G | ||
|
||
RUN apt-get -y update && apt-get -y upgrade &&\ | ||
apt-get -y --no-install-recommends install gettext nginx varnish varnish-modules &&\ | ||
apt-get -y clean && rm -rf /var/lib/apt/lists/* | ||
|
||
COPY docker-entrypoint.sh / | ||
COPY default.conf /etc/nginx/default.conf | ||
COPY nginx.default.template / | ||
|
||
RUN set -e; \ | ||
export DEBIAN_FRONTEND=noninteractive; \ | ||
|
@@ -32,7 +32,6 @@ RUN set -e; \ | |
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
gettext \ | ||
git \ | ||
libgetdns10 \ | ||
libgetdns-dev \ | ||
|
@@ -41,7 +40,10 @@ RUN set -e; \ | |
pkg-config \ | ||
python3-docutils; \ | ||
\ | ||
rm /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default; \ | ||
touch /etc/nginx/default.conf; \ | ||
sed -i '/sites-enabled.*$/i \\tinclude \/etc\/nginx\/default\.conf;' /etc/nginx/nginx.conf; \ | ||
nginx -t -c /etc/nginx/nginx.conf; \ | ||
\ | ||
cd /tmp; \ | ||
git clone https://github.com/varnish/toolbox.git; cd toolbox; \ | ||
|
@@ -56,7 +58,6 @@ RUN set -e; \ | |
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
gettext \ | ||
git \ | ||
libgetdns10 \ | ||
libgetdns-dev \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 12 additions & 12 deletions
24
proxy_cached/default.conf → proxy_cached/nginx.default.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
server { | ||
listen 8080 default_server; | ||
server_name ${SERVER_NAME}; | ||
location / { | ||
proxy_pass ${PROXY_PROTO}${PROXY_HOST}; | ||
proxy_set_header Host ${PROXY_HOST}; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
} | ||
server { | ||
listen 8080 default_server; | ||
server_name $SERVER_NAME; | ||
|
||
location / { | ||
proxy_pass $PROXY_PROTO$PROXY_HOST; | ||
proxy_set_header Host $PROXY_HOST; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
proxy_set_header X-Forwarded-Proto $scheme; | ||
} | ||
} |