diff --git a/Dockerfile b/Dockerfile
index fdb7d5e..fa24edf 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -16,6 +16,7 @@ SHELL ["/bin/bash","-ex","-c"]
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y\
build-essential\
+ closure-compiler\
cron\
locales\
libgdal-dev\
diff --git a/apps/map/admin.py b/apps/map/admin.py
index 10af6a2..30248af 100644
--- a/apps/map/admin.py
+++ b/apps/map/admin.py
@@ -1,4 +1,6 @@
from django.contrib import admin
-from apps.map.models import CaseStudy
+from leaflet.admin import LeafletGeoAdmin
-admin.site.register(CaseStudy)
+from .models import CaseStudy
+
+admin.site.register(CaseStudy, LeafletGeoAdmin)
diff --git a/apps/map/forms.py b/apps/map/forms.py
new file mode 100644
index 0000000..8b85f8a
--- /dev/null
+++ b/apps/map/forms.py
@@ -0,0 +1,25 @@
+from django import forms
+from crispy_forms.helper import FormHelper
+from crispy_forms.layout import Submit
+from leaflet.forms.widgets import LeafletWidget
+
+from .models import CaseStudy
+
+
+class CaseStudyForm(forms.ModelForm):
+
+ def __init__(self, *args, **kwargs):
+ super(CaseStudyForm, self).__init__(*args, **kwargs)
+ self.helper = FormHelper()
+ self.helper.form_id = 'case-study-form'
+ self.helper.form_class = 'form-horizontal'
+ self.helper.form_method = 'post'
+ self.helper.form_action = 'submit'
+ self.helper.label_class = 'col-lg-2'
+ self.helper.field_class = 'col-lg-8'
+ self.helper.add_input(Submit('submit', 'Submit'))
+
+ class Meta:
+ model = CaseStudy
+ fields = '__all__'
+ widgets = {'location': LeafletWidget()}
diff --git a/apps/map/models.py b/apps/map/models.py
index 134d346..3c1ce2e 100644
--- a/apps/map/models.py
+++ b/apps/map/models.py
@@ -25,10 +25,9 @@ class CaseStudy(models.Model):
editable=False
)
+ project_name = models.CharField(max_length=128)
# Location of map pin
location = models.PointField()
-
- project_name = models.CharField(max_length=128)
supply_chain = models.CharField(
max_length=1,
choices=SUPPLY_CHAIN_CHOICES
diff --git a/apps/map/static/map/ojuso-logo-white.png b/apps/map/static/map/ojuso-logo-white.png
new file mode 100644
index 0000000..0276cb1
Binary files /dev/null and b/apps/map/static/map/ojuso-logo-white.png differ
diff --git a/apps/map/templates/map/_nav.html b/apps/map/templates/map/_nav.html
new file mode 100644
index 0000000..2af65d1
--- /dev/null
+++ b/apps/map/templates/map/_nav.html
@@ -0,0 +1,15 @@
+{% load staticfiles %}
+
+
diff --git a/apps/map/templates/map/base.html b/apps/map/templates/map/base.html
new file mode 100644
index 0000000..f789084
--- /dev/null
+++ b/apps/map/templates/map/base.html
@@ -0,0 +1,67 @@
+{% spaceless %}
+{% load bootstrap3 %}
+{% load compress %}
+{% load i18n %}
+{% load leaflet_tags %}
+
+
+
+
+
+ {# Metadata #}
+
+
+
+ {% trans "Ojuso Platform Map" %}
+
+
+
+ {# CDN Stylesheets #}
+
+
+
+
+ {# Additional Stylesheets #}
+ {% compress css %}
+ {% block stylesheets %}
+
+ {% endblock %}
+ {% endcompress %}
+
+
+
+
+ {# Main Markup #}
+ {% block body %}{% endblock %}
+
+ {# CDN Javascript #}
+
+
+
+ {# Additional Scripts #}
+ {% block scripts %}{% endblock %}
+
+
+
+{% endspaceless %}
diff --git a/apps/map/templates/map/base_with_container.html b/apps/map/templates/map/base_with_container.html
new file mode 100644
index 0000000..435ad0e
--- /dev/null
+++ b/apps/map/templates/map/base_with_container.html
@@ -0,0 +1,34 @@
+{% extends "map/base.html" %}
+
+{% block stylesheets %}
+ {{ block.super }}
+
+{% endblock %}
+
+{% block body %}
+
+ {% include "map/_nav.html" %}
+ {% block nav_links %}
+ Case Studies
+ {% endblock %}
+
+
+
+
+
{% block title %}{% endblock %}
+
{% block description %}{% endblock %}
+
+
+ {% block content %}
+ {% endblock %}
+
+
+{% endblock %}
diff --git a/apps/map/templates/map/base_with_jumbo.html b/apps/map/templates/map/base_with_jumbo.html
new file mode 100644
index 0000000..d6dec46
--- /dev/null
+++ b/apps/map/templates/map/base_with_jumbo.html
@@ -0,0 +1,30 @@
+{% extends "map/base.html" %}
+
+{% block stylesheets %}
+ {{ block.super }}
+
+{% endblock %}
+
+{% block body %}
+
+ {% include "map/_nav.html" %}
+
+
+
+ {% block content %}
+ {% endblock %}
+
+
+{% endblock %}
diff --git a/apps/map/templates/map/form.html b/apps/map/templates/map/form.html
new file mode 100644
index 0000000..3cfd697
--- /dev/null
+++ b/apps/map/templates/map/form.html
@@ -0,0 +1,24 @@
+{% extends "map/base_with_container.html" %}
+{% load compress %}
+{% load crispy_forms_tags %}
+{% load i18n %}
+{% load leaflet_tags %}
+
+
+{% block stylesheets %}
+ {{ block.super }}
+ {% leaflet_css %}
+
+{% endblock %}
+
+
+{% block title %}{% trans "Submit a Case Study" %}{% endblock %}
+{% block description %}{% trans "Here you can submit a case study for review and it will be added to the map." %}{% endblock %}
+
+{% block content %}
+ {% crispy form %}
+{% endblock %}
+
+{% block scripts %}
+ {% leaflet_js %}
+{% endblock %}
diff --git a/apps/map/templates/map/index.html b/apps/map/templates/map/index.html
index 8c6072a..584ebfb 100644
--- a/apps/map/templates/map/index.html
+++ b/apps/map/templates/map/index.html
@@ -1,56 +1,113 @@
+{% extends "map/base_with_jumbo.html" %}
{% load bootstrap3 %}
+{% load compress %}
{% load i18n %}
{% load leaflet_tags %}
-
-
-
-
- {% trans "Ojuso Platform Map" %}
-
- {% bootstrap_css %}
- {% leaflet_js %}
- {% leaflet_css %}
-
-
-
- Ojuso Platform Map
- {% leaflet_map "main" callback="main_app_init" %}
-
-
- {% bootstrap_javascript %}
-
-
-
+
+{% block stylesheets %}
+ {{ block.super }}
+ {% leaflet_css %}
+
+{% endblock %}
+
+
+{% block title %}{% trans "Ojuso Platform Map" %}{% endblock %}
+
+
+{% block content %}
+
+
+{% endblock %}
+
+
+{% block scripts %}
+ {% leaflet_map "main" callback="main_app_init" creatediv=False %}
+ {% leaflet_js %}
+
+{% endblock %}
diff --git a/apps/map/urls.py b/apps/map/urls.py
index 920c96b..b0a8da8 100644
--- a/apps/map/urls.py
+++ b/apps/map/urls.py
@@ -8,5 +8,6 @@ urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^data.geojson$',
GeoJSONLayerView.as_view(model=CaseStudy, geometry_field='location'),
- name='data')
+ name='data'),
+ url(r'^case-study/add', views.form, name='form')
]
diff --git a/apps/map/views.py b/apps/map/views.py
index cc0ea94..60dee31 100644
--- a/apps/map/views.py
+++ b/apps/map/views.py
@@ -1,5 +1,12 @@
from django.shortcuts import render
+from .forms import CaseStudyForm
+
def index(request):
return render(request, 'map/index.html')
+
+
+def form(request):
+ form = CaseStudyForm
+ return render(request, 'map/form.html', {'form': form})
diff --git a/bin/create-discourse b/bin/create-discourse
index b064b4b..f80001f 100755
--- a/bin/create-discourse
+++ b/bin/create-discourse
@@ -1,27 +1,27 @@
#!/bin/bash
# Create Discourse
-docker run -d --restart=always
- -e LANG=en_US.UTF-8 \
- -e RAILS_ENV=production \
- -e UNICORN_WORKERS=4 \
- -e UNICORN_SIDEKIQS=1 \
- -e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 \
- -e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 \
- -e RUBY_GC_HEAP_INIT_SLOTS=400000 \
- -e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 \
- -e DISCOURSE_DB_SOCKET=/var/run/postgresql \
- -e LETSENCRYPT_DIR=/shared/letsencrypt \
- -e DISCOURSE_HOSTNAME=forum.ojuso.org \
- -e DISCOURSE_DEVELOPER_EMAILS=admin@ojuso.org \
- -e DISCOURSE_SMTP_ADDRESS=mail.gandi.net \
- -e DISCOURSE_SMTP_PORT=587 \
- -e DISCOURSE_SMTP_USER_NAME=admin@ojuso.org \
- -e DISCOURSE_SMTP_PASSWORD=QN7yosrnch1le474H56mesVR1SRw6sfO3izJDZnJ6T62Cj9I57CplW6UYZY6VXsq7lLr868bIK3kSXGyWiSrAyWK \
- -e LETSENCRYPT_ACCOUNT_EMAIL=admin@ojuso.org -h energy-app \
- -e DOCKER_HOST_IP=172.17.0.1 \
- --name app \
- -t -p 80:80 -p 443:443 \
- -v /var/discourse/shared/standalone:/shared \
- -v /var/discourse/shared/standalone/log/var-log:/var/log \
- --mac-address 02:2d:a6:d4:85:4a \
- local_discourse/app /sbin/boot
+docker run -d --restart=always \
+-e LANG=en_US.UTF-8 \
+-e RAILS_ENV=production \
+-e UNICORN_WORKERS=4 \
+-e UNICORN_SIDEKIQS=1 \
+-e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 \
+-e RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000 \
+-e RUBY_GC_HEAP_INIT_SLOTS=400000 \
+-e RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5 \
+-e DISCOURSE_DB_SOCKET=/var/run/postgresql \
+-e LETSENCRYPT_DIR=/shared/letsencrypt \
+-e DISCOURSE_HOSTNAME=forum.ojuso.org \
+-e DISCOURSE_DEVELOPER_EMAILS=admin@ojuso.org \
+-e DISCOURSE_SMTP_ADDRESS=mail.gandi.net \
+-e DISCOURSE_SMTP_PORT=587 \
+-e DISCOURSE_SMTP_USER_NAME=admin@ojuso.org \
+-e DISCOURSE_SMTP_PASSWORD=QN7yosrnch1le474H56mesVR1SRw6sfO3izJDZnJ6T62Cj9I57CplW6UYZY6VXsq7lLr868bIK3kSXGyWiSrAyWK \
+-e LETSENCRYPT_ACCOUNT_EMAIL=admin@ojuso.org -h energy-app \
+-e DOCKER_HOST_IP=172.17.0.1 \
+--name app \
+-p 80:80 -p 443:443 \
+-v /var/discourse/shared/standalone:/shared \
+-v /var/discourse/shared/standalone/log/var-log:/var/log \
+--mac-address 02:2d:a6:d4:85:4a \
+local_discourse/app /sbin/boot
diff --git a/bin/sri-hash b/bin/sri-hash
new file mode 100755
index 0000000..b2446f5
--- /dev/null
+++ b/bin/sri-hash
@@ -0,0 +1,23 @@
+#!/bin/bash
+usage="Usage: $(basename "$0") URL
+Generate the subresource integrity hash (SRI) of URL.
+
+ --help display this help and exit"
+
+seed=42
+while getopts ':hs-help:' option; do
+ case "$option" in
+ h) echo "$usage"
+ exit
+ ;;
+ :) printf "missing argument for -%s\n" "$OPTARG" >&2
+ echo "$usage" >&2
+ exit 1
+ ;;
+ \?) printf "illegal option: -%s\n" "$OPTARG" >&2
+ echo "$usage" >&2
+ exit 1
+ ;;
+ esac
+done
+echo sha384-$(curl -s $1 | openssl dgst -sha384 -binary | openssl enc -base64 -A)
diff --git a/environment.sh b/environment.sh
new file mode 100755
index 0000000..ae0007c
--- /dev/null
+++ b/environment.sh
@@ -0,0 +1,45 @@
+#!/bin/bash -e
+export DEBUG=0
+export ALLOWED_HOSTS=map.ojuso.org
+export DATABASE_HOST=localhost
+export DATABASE_NAME=postgres
+export DATABASE_PASSWORD=2xXKKS9zdrBX9QJaV5Z5NPTiiW8LtTiR4vAGSACddqFTrBdhgwZHKYnLqjJedAi3
+export EMAIL_HOST=mail.gandi.net
+export EMAIL_HOST_USER=admin@ojuso.org
+export EMAIL_HOST_PASSWORD=QN7yosrnch1le474H56mesVR1SRw6sfO3izJDZnJ6T62Cj9I57CplW6UYZY6VXsq7lLr868bIK3kSXGyWiSrAyWK
+export EMAIL_PORT=587
+export EMAIL_USE_TLS=1
+export SECRET_KEY=a3DfjSmWkSffsPscRscqaxGv6HsBN8VKL8Q4EU4QcdEckB8scogrMP4tv7Eo7LZw
+export SERVER_EMAIL=Ojuso\ Platform\ Notification\ \
+export POSTGRES_USER=postgres
+export POSTGRES_PASSWORD=2xXKKS9zdrBX9QJaV5Z5NPTiiW8LtTiR4vAGSACddqFTrBdhgwZHKYnLqjJedAi3
+export DISCOURSE_DB_SOCKET=/var/run/postgresql
+export DISCOURSE_DEVELOPER_EMAILS=admin@ojuso.org
+export DISCOURSE_HOSTNAME=forum.ojuso.org
+export DISCOURSE_SMTP_ADDRESS=mail.gandi.net
+export DISCOURSE_SMTP_PASSWORD=QN7yosrnch1le474H56mesVR1SRw6sfO3izJDZnJ6T62Cj9I57CplW6UYZY6VXsq7lLr868bIK3kSXGyWiSrAyWK
+export DISCOURSE_SMTP_PORT=587
+export DISCOURSE_SMTP_USER_NAME=admin@ojuso.org
+export DOCKER_HOST_IP=172.17.0.1
+export LANG=en_US.UTF-8
+export RAILS_ENV=production
+export RUBY_GC_HEAP_GROWTH_MAX_SLOTS=40000
+export RUBY_GC_HEAP_INIT_SLOTS=400000
+export RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.5
+export RUBY_GLOBAL_METHOD_CACHE_SIZE=131072
+export UNICORN_SIDEKIQS=1
+export UNICORN_WORKERS=4
+export WEBLATE_DEBUG=0
+export WEBLATE_LOGLEVEL=DEBUG
+export WEBLATE_SITE_TITLE=Ojuso\ Weblate
+export WEBLATE_ADMIN_NAME=Weblate\ Admin
+export WEBLATE_ADMIN_EMAIL=admin@ojuso.org
+export WEBLATE_ADMIN_PASSWORD=zPFPtHLsRRFAAcApeGd23aV6Hg66KpTkWs2becsMMoL9dTeKLNt3PfH5Bzhyna8q
+export WEBLATE_SERVER_EMAIL=noreply@ojuso.org
+export WEBLATE_DEFAULT_FROM_EMAIL=noreply@ojuso.org
+export WEBLATE_ALLOWED_HOSTS=*
+export WEBLATE_REGISTRATION_OPEN=1
+export WEBLATE_GITHUB_USERNAME=livmackintosh
+export WEBLATE_EMAIL_HOST=mail.gandi.net
+export WEBLATE_EMAIL_USER=admin@ojuso.org
+export WEBLATE_EMAIL_PASSWORD=QN7yosrnch1le474H56mesVR1SRw6sfO3izJDZnJ6T62Cj9I57CplW6UYZY6VXsq7lLr868bIK3kSXGyWiSrAyWK
diff --git a/ojusomap/settings.py b/ojusomap/settings.py
index e5b9e8b..3dad794 100644
--- a/ojusomap/settings.py
+++ b/ojusomap/settings.py
@@ -45,6 +45,7 @@ INSTALLED_APPS = [
'django.contrib.gis',
'bootstrap3',
'cas_server',
+ 'compressor',
'crispy_forms',
'django_extensions',
'leaflet',
@@ -158,6 +159,13 @@ LOCALE_PATHS = [
STATIC_ROOT = os.path.join(BASE_DIR, 'static/')
STATIC_URL = os.getenv("STATIC_URL", '/static/')
+STATICFILES_FINDERS = [
+ 'django.contrib.staticfiles.finders.FileSystemFinder',
+ 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
+ 'compressor.finders.CompressorFinder',
+]
+
+
# Cache
# https://docs.djangoproject.com/en/1.11/topics/cache/
@@ -191,3 +199,21 @@ REST_FRAMEWORK = {
'rest_framework.parsers.JSONParser',
)
}
+
+# Django Crispy Forms
+# http://django-crispy-forms.readthedocs.io/en/latest/
+
+CRISPY_TEMPLATE_PACK = 'bootstrap3'
+
+# Django-Leaflet
+# https://django-leaflet.readthedocs.io/en/latest/
+
+LEAFLET_CONFIG = {
+ 'MIN_ZOOM': 3,
+ 'MAX_ZOOM': 16,
+ 'PLUGINS': {
+ 'forms': {
+ 'auto-include': True
+ }
+ },
+}
diff --git a/ojusomap/urls.py b/ojusomap/urls.py
index 7c98f74..38e32f3 100644
--- a/ojusomap/urls.py
+++ b/ojusomap/urls.py
@@ -17,7 +17,6 @@ from django.conf.urls import include, url
from django.contrib import admin
from django.contrib.auth.models import User
from apps.map.models import CaseStudy
-from django.views.generic.base import RedirectView
from rest_framework import routers, serializers, viewsets
from rest_framework_gis import serializers as gis_serializers
@@ -48,9 +47,8 @@ apirouter.register(r'users', UserViewSet)
apirouter.register(r'case-studies', CaseStudyViewSet)
urlpatterns = [
- url(r'^$', RedirectView.as_view(url="/beta/")),
+ url(r'', include('apps.map.urls'), name="map"),
url(r'api/', include(apirouter.urls)),
- url(r'^beta/', include('apps.map.urls'), name="beta"),
url(r'^admin/', admin.site.urls),
url(r'^cas/', include('cas_server.urls', namespace='cas_server')),
]
diff --git a/requirements.txt b/requirements.txt
index 27b6662..d364449 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,9 @@
appdirs==1.4.3
Django==1.10.7
+django-appconf==1.0.2
django-bootstrap3==8.2.3
django-cas-server==0.8.0
+django-compressor==2.1.1
django-countries==4.5
django-crispy-forms==1.6.1
django-extensions==1.7.9
@@ -18,6 +20,8 @@ psycopg2==2.7.1
pyparsing==2.2.0
python-memcached==1.58
pytz==2017.2
+rcssmin==1.0.6
requests==2.14.2
requests-futures==0.9.7
+rjsmin==1.0.12
six==1.10.0
diff --git a/support/locales/en_GB/LC_MESSAGES/django.po b/support/locale/en_GB/LC_MESSAGES/django.po
similarity index 100%
rename from support/locales/en_GB/LC_MESSAGES/django.po
rename to support/locale/en_GB/LC_MESSAGES/django.po
diff --git a/support/locale/es/LC_MESSAGES/django.po b/support/locale/es/LC_MESSAGES/django.po
new file mode 100644
index 0000000..7f6a27d
--- /dev/null
+++ b/support/locale/es/LC_MESSAGES/django.po
@@ -0,0 +1,51 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR , YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-06-16 16:05+0000\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME \n"
+"Language-Team: LANGUAGE \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+#: apps/map/templates/map/base.html:15 apps/map/templates/map/index.html:15
+msgid "Ojuso Platform Map"
+msgstr ""
+
+#: apps/map/templates/map/form.html:15 apps/map/templates/map/index.html:108
+msgid "Submit a Case Study"
+msgstr ""
+
+#: apps/map/templates/map/form.html:16
+msgid ""
+"Here you can submit a case study for review and it will be added to the map."
+msgstr ""
+
+#: apps/map/templates/map/index.html:51
+msgid "Quick View"
+msgstr ""
+
+#: apps/map/templates/map/index.html:58 apps/map/templates/map/index.html:89
+msgid "Close"
+msgstr ""
+
+#: apps/map/templates/map/index.html:92
+msgid "Save changes"
+msgstr ""
+
+#: ojusomap/settings.py:149
+msgid "English"
+msgstr ""
+
+#: ojusomap/settings.py:150
+msgid "Spanish"
+msgstr ""
diff --git a/support/nginx/directives/gzip.directive b/support/nginx/directives/gzip.directive
new file mode 100644
index 0000000..e5bd46e
--- /dev/null
+++ b/support/nginx/directives/gzip.directive
@@ -0,0 +1,56 @@
+ # Enable gzip compression.
+ # Default: off
+ gzip on;
+
+ # Compression level (1-9).
+ # 5 is a perfect compromise between size and CPU usage, offering about
+ # 75% reduction for most ASCII files (almost identical to level 9).
+ # Default: 1
+ gzip_comp_level 5;
+
+ # Don't compress anything that's already small and unlikely to shrink much
+ # if at all (the default is 20 bytes, which is bad as that usually leads to
+ # larger files after gzipping).
+ # Default: 20
+ gzip_min_length 256;
+
+ # Compress data even for clients that are connecting to us via proxies,
+ # identified by the "Via" header (required for CloudFront).
+ # Default: off
+ gzip_proxied any;
+
+ # Tell proxies to cache both the gzipped and regular version of a resource
+ # whenever the client's Accept-Encoding capabilities header varies;
+ # Avoids the issue where a non-gzip capable client (which is extremely rare
+ # today) would display gibberish if their proxy gave them the gzipped version.
+ # Default: off
+ gzip_vary on;
+
+ # Compress all output labeled with one of the following MIME-types.
+ # text/html is always compressed by gzip module.
+ # Default: text/html
+ gzip_types
+ application/atom+xml
+ application/javascript
+ application/json
+ application/ld+json
+ application/manifest+json
+ application/rss+xml
+ application/vnd.geo+json
+ application/vnd.ms-fontobject
+ application/x-font-ttf
+ application/x-web-app-manifest+json
+ application/xhtml+xml
+ application/xml
+ font/opentype
+ image/bmp
+ image/svg+xml
+ image/x-icon
+ text/cache-manifest
+ text/css
+ text/plain
+ text/vcard
+ text/vnd.rim.location.xloc
+ text/vtt
+ text/x-component
+ text/x-cross-domain-policy;
diff --git a/support/nginx/nginx.template b/support/nginx/nginx.template
index f3d23f3..01c0a0e 100644
--- a/support/nginx/nginx.template
+++ b/support/nginx/nginx.template
@@ -6,8 +6,9 @@ server {
alias /web/acme;
}
- return 301 https://$host$request_uri;
-
+ location / {
+ return 301 https://$host$request_uri;
+ }
}
server {
@@ -66,12 +67,12 @@ server {
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
- server_name energy.ojuso.org;
+ server_name i18n.ojuso.org;
- ssl_certificate /web/certs/energy.ojuso.org/fullchain.pem;
- ssl_certificate_key /web/certs/energy.ojuso.org/privkey.pem;
+ ssl_certificate /web/certs/i18n.ojuso.org/fullchain.pem;
+ ssl_certificate_key /web/certs/i18n.ojuso.org/privkey.pem;
ssl_dhparam /web/certs/dhparam.pem;
- ssl_trusted_certificate /web/certs/energy.ojuso.org/chain.pem;
+ ssl_trusted_certificate /web/certs/i18n.ojuso.org/chain.pem;
include directives/*;
@@ -79,21 +80,6 @@ server {
root /web/weblate/data/static;
- gzip on;
- gzip_proxied any;
- gzip_types text/plain
- application/atom+xml
- application/rss+xml
- application/javascript
- text/xml
- text/css
- application/xml
- application/json
- image/svg+xml
- font/opentype
- application/x-font-ttf
- application/vnd.ms-fontobject;
-
location /favicon.ico {
alias /web/weblate/data/static/favicon.ico;
expires 30d;