This repository has been archived by the owner on Apr 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
190 changed files
with
155,066 additions
and
721 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
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
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 |
---|---|---|
|
@@ -4,23 +4,24 @@ USER root | |
|
||
MAINTAINER HSR Geometalab <[email protected]> | ||
|
||
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ | ||
RUN apt-get clean && DEBIAN_FRONTEND=noninteractive apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y\ | ||
\ | ||
libgeos-dev \ | ||
libgeos++-dev \ | ||
python3-pip | ||
python3-pip \ | ||
liblapack-dev \ | ||
gfortran | ||
|
||
# Install required Python packages: | ||
ENV HOME /home/py | ||
|
||
WORKDIR $HOME | ||
|
||
ENV REQS_LAST_UPDATED 04-05-2016 8:50 | ||
ADD ./requirements.txt $HOME/ | ||
|
||
RUN pip3 install honcho | ||
|
||
ADD ./requirements-mediator.txt $HOME/ | ||
ADD ./requirements.txt $HOME/ | ||
RUN pip3 install -r requirements-mediator.txt | ||
RUN pip3 install -r requirements.txt | ||
|
||
# TODO: this is just a temporary solution, use pip for production as soon as geometalab.osmaxx is published there | ||
|
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,2 +1,5 @@ | ||
FROM nginx:alpine | ||
COPY ./docker_entrypoint/nginx/default.conf /etc/nginx/conf.d/default.conf | ||
COPY ./docker_entrypoint/nginx/default.conf.template /etc/nginx/conf.d/default.conf.template | ||
CMD DOMAIN_NAMES=$(echo $VIRTUAL_HOST | sed 's/,/ /g') envsubst '$DOMAIN_NAMES' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf \ | ||
&& cat /etc/nginx/conf.d/default.conf \ | ||
&& nginx -g 'daemon off;' |
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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# read more here http://lollyrock.com/articles/content-security-policy/ | ||
|
||
# Copied and changed from https://gist.github.com/plentz/6737338 | ||
|
||
# don't send the nginx version number in error pages and Server header | ||
server_tokens off; | ||
|
||
# config to don't allow the browser to render the page inside an frame or iframe | ||
# and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking | ||
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri | ||
# https://developer.mozilla.org/en-US/docs/HTTP/X-Frame-Options | ||
add_header X-Frame-Options SAMEORIGIN; | ||
|
||
# when serving user-supplied content, include a X-Content-Type-Options: nosniff header along with the Content-Type: header, | ||
# to disable content-type sniffing on some browsers. | ||
# https://www.owasp.org/index.php/List_of_useful_HTTP_headers | ||
# currently suppoorted in IE > 8 http://blogs.msdn.com/b/ie/archive/2008/09/02/ie8-security-part-vi-beta-2-update.aspx | ||
# http://msdn.microsoft.com/en-us/library/ie/gg622941(v=vs.85).aspx | ||
# 'soon' on Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=471020 | ||
add_header X-Content-Type-Options nosniff; | ||
|
||
# This header enables the Cross-site scripting (XSS) filter built into most recent web browsers. | ||
# It's usually enabled by default anyway, so the role of this header is to re-enable the filter for | ||
# this particular website if it was disabled by the user. | ||
# https://www.owasp.org/index.php/List_of_useful_HTTP_headers | ||
add_header X-XSS-Protection "1; mode=block"; | ||
|
||
# with Content Security Policy (CSP) enabled(and a browser that supports it(http://caniuse.com/#feat=contentsecuritypolicy), | ||
# you can tell the browser that it can only download content from the domains you explicitly allow | ||
# http://www.html5rocks.com/en/tutorials/security/content-security-policy/ | ||
# https://www.owasp.org/index.php/Content_Security_Policy | ||
# more: http://www.html5rocks.com/en/tutorials/security/content-security-policy/#inline-code-considered-harmful | ||
add_header Content-Security-Policy "default-src 'self'; script-src 'self'; img-src 'self' http://*.osm.org https://*.osm.org data:; style-src 'self' 'unsafe-inline'; font-src 'self' data:; frame-src; object-src 'none'"; | ||
|
||
proxy_http_version 1.1; | ||
proxy_buffering off; | ||
proxy_set_header Host $http_host; | ||
proxy_set_header Upgrade $http_upgrade; | ||
proxy_set_header X-Real-IP $remote_addr; | ||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
|
||
server { | ||
server_name _; # This is just an invalid value which will never trigger on a real hostname. | ||
listen 80; | ||
access_log /var/log/nginx/access.log; | ||
return 503; | ||
} | ||
|
||
upstream frontend { | ||
server frontend:8000; | ||
} | ||
|
||
server { | ||
listen 80; | ||
server_name ${DOMAIN_NAMES}; | ||
|
||
location = /favicon.ico { access_log off; log_not_found off; } | ||
|
||
location / { | ||
proxy_pass http://frontend; | ||
} | ||
|
||
location /media { | ||
autoindex off; | ||
root /data/frontend/; | ||
} | ||
} |
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 +1,2 @@ | ||
CREATE FUNCTION transliterate(text) RETURNS text AS '$libdir/utf8translit', 'transliterate' LANGUAGE C STRICT; | ||
CREATE EXTENSION IF NOT EXISTS postgis; | ||
CREATE EXTENSION IF NOT EXISTS osml10n; |
Oops, something went wrong.