Commit bf6d0440 authored by Daniel LACROIX's avatar Daniel LACROIX
Browse files

add nginx in front of etherpad

parent a3ad8874
FROM node:alpine
ARG NODE_ENV=production
RUN mkdir /app && apk update && apk add curl gettext
RUN mkdir /app && apk update && apk add curl gettext nginx
COPY ./1.7.0.tar.gz /app
WORKDIR /app
RUN tar zxvf 1.7.0.tar.gz --strip 1 -C /app && \
......@@ -8,5 +8,6 @@ RUN tar zxvf 1.7.0.tar.gz --strip 1 -C /app && \
RUN /app/bin/installDeps.sh
COPY ./settings.json.tmpl /app/settings.json.tmpl
COPY ./docker-entrypoint.sh /docker-entrypoint.sh
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD [ "/docker-entrypoint.sh" ]
......@@ -15,5 +15,6 @@ fi
envsubst "$(printf '${%s} ' $REPLACE_VARS)" < /app/settings.json.tmpl > /app/settings.json
echo $APIKEY > /app/APIKEY.txt
nginx
node node_modules/ep_etherpad-lite/node/server.js
#
# Nginx conf for laclasse etherpad
#
server {
listen 80;
server_name etherpad;
error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html/;
}
# Relocate root url
location /pads/ {
rewrite /pads/?(.+) /$1 break;
proxy_pass http://localhost:9001/;
proxy_redirect / /pads/;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
client_max_body_size 200m;
}
......@@ -8,7 +8,7 @@
//IP and port which etherpad should bind at
"ip": "0.0.0.0",
"port" : 80,
"port" : 9001,
// Option to hide/show the settings.json in admin page, default option is set to true
"showSettingsInAdminPage" : true,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment