From 36a9e0483d70efcbaa89e260307616ffe4645d48 Mon Sep 17 00:00:00 2001 From: rscnt Date: Wed, 27 May 2015 23:22:20 -0600 Subject: [PATCH 01/21] settings: added memcached config. Signed-off-by: rscnt --- dynamicweb/settings.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dynamicweb/settings.py b/dynamicweb/settings.py index 2cece707..7a803dec 100644 --- a/dynamicweb/settings.py +++ b/dynamicweb/settings.py @@ -224,6 +224,12 @@ CMS_PLACEHOLDER_CONF = { } } +CACHES = { + 'default': { + 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', + 'LOCATION': 'unix:/tmp/memcached.sock', + } +} try: from dynamicweb.local.local_settings import * From 00d3796e6d17e851b1da6995e7c212356248469f Mon Sep 17 00:00:00 2001 From: rscnt Date: Wed, 27 May 2015 23:22:40 -0600 Subject: [PATCH 02/21] txt: added list of debian packages Signed-off-by: rscnt --- requirements.debian.txt | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 requirements.debian.txt diff --git a/requirements.debian.txt b/requirements.debian.txt new file mode 100644 index 00000000..1779ed2c --- /dev/null +++ b/requirements.debian.txt @@ -0,0 +1,8 @@ +python-dev +virtualenvwrapper +libzmq-dev +libevent-dev +nginx +postgresql +postgresql-dev +memcached From c4bfe5f4bd60cdf4298572b4144ff85443662b58 Mon Sep 17 00:00:00 2001 From: rscnt Date: Wed, 27 May 2015 23:22:52 -0600 Subject: [PATCH 03/21] requirements: added circus + chaussette. Signed-off-by: rscnt --- requirements.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/requirements.txt b/requirements.txt index b3958b4c..fc2df87c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,6 +3,7 @@ psycopg2>=2.6 Pillow>=2 html5lib==0.999 six==1.3.0 #compat +python-memcached # django django==1.7.8 @@ -42,3 +43,8 @@ djangocms-oembed djangocms-table cmsplugin-filer==0.10.1 + +# production +circus +circus-web +chaussette From 9a27aafd99ada16298a2598dfb08b266b0f69667 Mon Sep 17 00:00:00 2001 From: rscnt Date: Wed, 27 May 2015 23:28:12 -0600 Subject: [PATCH 04/21] deleted foo.txt --- foo.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 foo.txt diff --git a/foo.txt b/foo.txt deleted file mode 100644 index e69de29b..00000000 From 6b5d43a553d74994efee5fc97e867ae3b0eb3c20 Mon Sep 17 00:00:00 2001 From: rscnt Date: Thu, 28 May 2015 00:39:14 -0600 Subject: [PATCH 05/21] requirements: added gevent. Signed-off-by: rscnt --- requirements.debian.txt | 7 ++++--- requirements.txt | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/requirements.debian.txt b/requirements.debian.txt index 1779ed2c..459a6748 100644 --- a/requirements.debian.txt +++ b/requirements.debian.txt @@ -1,8 +1,9 @@ -python-dev +python-dev virtualenvwrapper -libzmq-dev -libevent-dev +libzmq-dev +libevent-dev nginx postgresql postgresql-dev memcached +libmemcached-dev diff --git a/requirements.txt b/requirements.txt index fc2df87c..3998cb60 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,6 +45,8 @@ djangocms-table cmsplugin-filer==0.10.1 # production +greenlet circus circus-web chaussette +gevent From 62c0f014aba609f13ff132ee0026ffb43c3754c6 Mon Sep 17 00:00:00 2001 From: rscnt Date: Thu, 28 May 2015 00:39:28 -0600 Subject: [PATCH 06/21] config: added circus .ini for webapp Signed-off-by: rscnt --- configs/circus.dynamicweb.ini.example | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 configs/circus.dynamicweb.ini.example diff --git a/configs/circus.dynamicweb.ini.example b/configs/circus.dynamicweb.ini.example new file mode 100644 index 00000000..7daf8531 --- /dev/null +++ b/configs/circus.dynamicweb.ini.example @@ -0,0 +1,17 @@ +[circus] +check_delay = 5 +endpoint = tcp://127.0.0.1:5555 +pubsub_endpoint = tcp://127.0.0.1:5556 +stats_endpoint = tcp://127.0.0.1:5557 + +[socket:dynamicweb] +host = 127.0.0.1 +port = 8080 + +[watcher:dynamicweb] +cmd = /home/r/.virtualenvs/dynamicweb/bin/chaussette --backend gevent --fd $(circus.sockets.dynamicweb) dynamicweb.wsgi.application +use_sockets = True +numprocesses = 5 + +[env:dynamicweb] +PYTHONPATH = /home/r/dynamicweb \ No newline at end of file From 9be99ab8ee60e196e812707d5ad0225aaba5cc61 Mon Sep 17 00:00:00 2001 From: rscnt Date: Thu, 28 May 2015 00:39:48 -0600 Subject: [PATCH 07/21] conf: added circus .init for nginx Signed-off-by: rscnt --- configs/circus.nginx.ini.example | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 configs/circus.nginx.ini.example diff --git a/configs/circus.nginx.ini.example b/configs/circus.nginx.ini.example new file mode 100644 index 00000000..9a7667a7 --- /dev/null +++ b/configs/circus.nginx.ini.example @@ -0,0 +1,7 @@ +[watcher:nginx] +cmd = /usr/sbin/nginx -c ./nginx.dynamicweb.conf +numprocesses = 1 +use_sockets = False +copy_env = True +singleton = True +autostart = {{ RUN_WEB | default('True') }} \ No newline at end of file From 1d70f973478f813eb12cec76a1baed0e42a79d63 Mon Sep 17 00:00:00 2001 From: rscnt Date: Thu, 28 May 2015 00:40:07 -0600 Subject: [PATCH 08/21] conf: added example conf for nginx proxy Signed-off-by: rscnt --- configs/docker.services.yml | 27 +++++++++++++++++++++++++++ configs/nginx.dynamicweb.conf | 24 ++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 configs/docker.services.yml create mode 100644 configs/nginx.dynamicweb.conf diff --git a/configs/docker.services.yml b/configs/docker.services.yml new file mode 100644 index 00000000..eada936a --- /dev/null +++ b/configs/docker.services.yml @@ -0,0 +1,27 @@ +postgresql: + image: postgres + env_file: envs/psql.env + hostname: db + ports: + - "5432:5432" + +nginx: + image: nginx + env_file: envs/nginx.env + hostname: proxy + volumes: + - sites-enabled:/etc/nginx/conf.d + ports: + - "8000:8000" + +memcached: + image: memcached + env_file: envs/memcached.env + hostname: cache + +dynamicweb: + build: . + links: + - memcached + - db + - proxy \ No newline at end of file diff --git a/configs/nginx.dynamicweb.conf b/configs/nginx.dynamicweb.conf new file mode 100644 index 00000000..42100381 --- /dev/null +++ b/configs/nginx.dynamicweb.conf @@ -0,0 +1,24 @@ +server { + listen 80; + server_name destruction.io; + + location /static/ { + alias /home/r/dinamycweb/static/; + } + + location /media/ { + alias /home/r/dinamycweb/media/; + } + + location / { + proxy_pass http://localhost:8080/; + proxy_pass_header Server; + proxy_set_header Host $host; + proxy_redirect off; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_connect_timeout 600; + proxy_send_timeout 600; + proxy_read_timeout 600; + } +} From d80b3835ca9b638874c02c158c026741f3379dcd Mon Sep 17 00:00:00 2001 From: rscnt Date: Thu, 28 May 2015 02:09:05 -0600 Subject: [PATCH 09/21] config: circus fixed nginx example. Signed-off-by: rscnt --- configs/circus.nginx.ini.example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/circus.nginx.ini.example b/configs/circus.nginx.ini.example index 9a7667a7..2ae9cc4a 100644 --- a/configs/circus.nginx.ini.example +++ b/configs/circus.nginx.ini.example @@ -4,4 +4,4 @@ numprocesses = 1 use_sockets = False copy_env = True singleton = True -autostart = {{ RUN_WEB | default('True') }} \ No newline at end of file +autostart = True \ No newline at end of file From 755f70a1efafe1b65eec6b816daabf4fadcf2c48 Mon Sep 17 00:00:00 2001 From: rscnt Date: Thu, 28 May 2015 02:09:19 -0600 Subject: [PATCH 10/21] config: nginx example, prefered a complete config Signed-off-by: rscnt --- configs/nginx.dynamicweb.conf | 89 ++++++++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 22 deletions(-) diff --git a/configs/nginx.dynamicweb.conf b/configs/nginx.dynamicweb.conf index 42100381..ba25debc 100644 --- a/configs/nginx.dynamicweb.conf +++ b/configs/nginx.dynamicweb.conf @@ -1,24 +1,69 @@ -server { - listen 80; - server_name destruction.io; +user www-data; +worker_processes 2; +pid /var/run/nginx.pid; +daemon off; - location /static/ { - alias /home/r/dinamycweb/static/; - } - - location /media/ { - alias /home/r/dinamycweb/media/; - } - - location / { - proxy_pass http://localhost:8080/; - proxy_pass_header Server; - proxy_set_header Host $host; - proxy_redirect off; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Scheme $scheme; - proxy_connect_timeout 600; - proxy_send_timeout 600; - proxy_read_timeout 600; - } +events { + worker_connections 512; + # multi_accept on; +} + +http { + sendfile on; + tcp_nopush on; + tcp_nodelay on; + keepalive_timeout 65; + types_hash_max_size 2048; + server_tokens off; + port_in_redirect on; + + server_names_hash_bucket_size 128; + server_name_in_redirect off; + + client_max_body_size 60m; + + include /etc/nginx/mime.types; + default_type application/octet-stream; + + send_timeout 300; + client_body_timeout 300; + client_header_timeout 300; + + access_log /logs/access.log; + error_log /logs/error.log; + + gzip on; + gzip_disable "msie6"; + gzip_vary on; + gzip_proxied any; + gzip_comp_level 6; + gzip_buffers 16 8k; + gzip_http_version 1.1; + gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; + + upstream django { + server 127.0.0.1:8000; + } + + server { + listen 80 default; + server_name localhost; + location / { + proxy_pass http://django; + include proxy_params; + } + location /media/ { + root /data; + expires max; + access_log off; + } + location /static/ { + root /data; + expires max; + access_log off; + } + location ~ /\.ht { deny all; } + location ~ /\.hg { deny all; } + location ~ /\.svn { deny all; } + } } From f087832151651e343b978b88839bf5dad4d52991 Mon Sep 17 00:00:00 2001 From: rscnt Date: Thu, 28 May 2015 02:09:36 -0600 Subject: [PATCH 11/21] configs: debian packages added - added circus nginx conf fix. Signed-off-by: rscnt --- configs/circus.nginx.ini.example | 2 +- requirements.debian.txt | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configs/circus.nginx.ini.example b/configs/circus.nginx.ini.example index 2ae9cc4a..d13c7ef7 100644 --- a/configs/circus.nginx.ini.example +++ b/configs/circus.nginx.ini.example @@ -1,5 +1,5 @@ [watcher:nginx] -cmd = /usr/sbin/nginx -c ./nginx.dynamicweb.conf +cmd = /usr/sbin/nginx -c nginx.dynamicweb.conf numprocesses = 1 use_sockets = False copy_env = True diff --git a/requirements.debian.txt b/requirements.debian.txt index 459a6748..149d8130 100644 --- a/requirements.debian.txt +++ b/requirements.debian.txt @@ -1,9 +1,13 @@ -python-dev +python3-dev virtualenvwrapper libzmq-dev libevent-dev nginx postgresql postgresql-dev +postgresql-server-dev-9.4 memcached libmemcached-dev +libxml2-dev +libxslt1-dev +python3-lxml # this depends on the amount of ram that the server has. From 0734110804c78cf77c71d03bf30f2fadb89a12f2 Mon Sep 17 00:00:00 2001 From: rscnt Date: Thu, 28 May 2015 02:30:14 -0600 Subject: [PATCH 12/21] configs: replaced gevent with meinheld. Signed-off-by: rscnt --- configs/circus.dynamicweb.ini.example | 4 +++- requirements.txt | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/configs/circus.dynamicweb.ini.example b/configs/circus.dynamicweb.ini.example index 7daf8531..3167a3d4 100644 --- a/configs/circus.dynamicweb.ini.example +++ b/configs/circus.dynamicweb.ini.example @@ -3,14 +3,16 @@ check_delay = 5 endpoint = tcp://127.0.0.1:5555 pubsub_endpoint = tcp://127.0.0.1:5556 stats_endpoint = tcp://127.0.0.1:5557 +copy_env = True [socket:dynamicweb] host = 127.0.0.1 port = 8080 [watcher:dynamicweb] -cmd = /home/r/.virtualenvs/dynamicweb/bin/chaussette --backend gevent --fd $(circus.sockets.dynamicweb) dynamicweb.wsgi.application +cmd = /home/r/.virtualenvs/dynamicweb/bin/chaussette --backend meinheld --fd $(circus.sockets.dynamicweb) dynamicweb.wsgi.application use_sockets = True +copy_env = True numprocesses = 5 [env:dynamicweb] diff --git a/requirements.txt b/requirements.txt index 3998cb60..4f74483c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,8 +45,7 @@ djangocms-table cmsplugin-filer==0.10.1 # production -greenlet circus circus-web chaussette -gevent +meinheld From 9d521f33846bd00ee394413cacba7d3e6355f55c Mon Sep 17 00:00:00 2001 From: rscnt Date: Thu, 28 May 2015 02:30:28 -0600 Subject: [PATCH 13/21] configs: added include proxy conf example. Signed-off-by: rscnt --- configs/nginx.proxy.conf | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 configs/nginx.proxy.conf diff --git a/configs/nginx.proxy.conf b/configs/nginx.proxy.conf new file mode 100644 index 00000000..acf288fa --- /dev/null +++ b/configs/nginx.proxy.conf @@ -0,0 +1,24 @@ +server { + listen 8081; + server_name destruction.io; + + location /static/ { + alias /home/r/dynamicweb/static; + } + + location /media/ { + alias /home/r/dynamicweb/media; + } + + location / { + proxy_pass http://localhost:8080/; + proxy_pass_header Server; + proxy_set_header Host $host; + proxy_redirect off; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_connect_timeout 600; + proxy_send_timeout 600; + proxy_read_timeout 600; + } +} From f5f35b859ba35c2e6436e1eb16ce4fc44774a389 Mon Sep 17 00:00:00 2001 From: rscnt Date: Sat, 30 May 2015 20:29:38 -0600 Subject: [PATCH 14/21] templates: added 404 and 505. Signed-off-by: rscnt --- templates/404.html | 13 +++++++++++++ templates/505.html | 15 +++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 templates/404.html create mode 100644 templates/505.html diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 00000000..ae7ae0f4 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,13 @@ + + + + Page not found + + +

Page not found

+ +

Sorry, but the requested page could not be found.

+ + + diff --git a/templates/505.html b/templates/505.html new file mode 100644 index 00000000..a7beaded --- /dev/null +++ b/templates/505.html @@ -0,0 +1,15 @@ + + + + Page unavailable + + +

Page unavailable

+ +

Sorry, but the requested page is unavailable due to a + server hiccup.

+ +

Our engineers have been notified, so check back later.

+ + From f2506eb26f01999f03205f25629fbeff6f6dbfdc Mon Sep 17 00:00:00 2001 From: rscnt Date: Sat, 30 May 2015 20:29:49 -0600 Subject: [PATCH 15/21] config: added admin Signed-off-by: rscnt --- dynamicweb/settings.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dynamicweb/settings.py b/dynamicweb/settings.py index 7a803dec..44bca3f5 100644 --- a/dynamicweb/settings.py +++ b/dynamicweb/settings.py @@ -15,6 +15,10 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/ +ADMINS = ( + ('Nico Schottelius', 'nico.schottelius@ungleich.ch'), +) + SITE_ID = 1 APP_ROOT_ENDPOINT = "/" From 37968cfa713bca65fe05016f103edbd9e96953e0 Mon Sep 17 00:00:00 2001 From: rscnt Date: Sat, 30 May 2015 23:17:58 -0600 Subject: [PATCH 16/21] configs: ungleich circus. Signed-off-by: rscnt --- configs/circus.ungleich.ini | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 configs/circus.ungleich.ini diff --git a/configs/circus.ungleich.ini b/configs/circus.ungleich.ini new file mode 100644 index 00000000..fdd83192 --- /dev/null +++ b/configs/circus.ungleich.ini @@ -0,0 +1,16 @@ +[circus] +endpoint = tcp://127.0.0.1:5555 +pubsub_endpoint = tcp://127.0.0.1:5556 +stats_endpoint = tcp://127.0.0.1:5557 + +[watcher:web] +cmd = /home/r/.virtualenvs/ungleich-django-cms/bin/chaussette --fd $(circus.sockets.web) --backend tornado dynamicweb.wsgi.application +use_sockets = True +numprocesses = 5 +copy_env = True +virtualenv = /home/r/.virtualenvs/ungleich-django-cms + +[socket:web] +host = 0.0.0.0 +port = 8000 +copy_env = True From 9f4b59384a1086611a8f1841b85e00b0710e3bef Mon Sep 17 00:00:00 2001 From: rscnt Date: Sat, 30 May 2015 23:18:11 -0600 Subject: [PATCH 17/21] requirements: added gevent and circus git. Signed-off-by: rscnt --- requirements.txt | 3 ++- stable_requirements.txt | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 4f74483c..9abdc6d3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -45,7 +45,8 @@ djangocms-table cmsplugin-filer==0.10.1 # production -circus +-e git+git@github.com:circus-tent/circus.git#egg=circus circus-web chaussette meinheld +gevent diff --git a/stable_requirements.txt b/stable_requirements.txt index c59ac5de..9b5ff470 100644 --- a/stable_requirements.txt +++ b/stable_requirements.txt @@ -3,6 +3,7 @@ psycopg2==2.6 Pillow==2.8.1 html5lib==0.999 six==1.3.0 +python-memcached==1.54 # django django==1.7.8 @@ -41,11 +42,18 @@ djangocms-oembed==0.5 djangocms-table==1.2 cmsplugin-filer==0.10.1 + +# production +circus==0.11.1 +circus-web==0.5 +chaussette==1.2 +meinheld==0.5.7 ## The following requirements were added by pip freeze: aldryn-blog==0.4.6 aldryn-boilerplates==0.7 aldryn-common==0.1.3 aldryn-search==0.2.7 +anyjson==0.3.3 cssselect==0.9.1 Django==1.7.8 django-admin-enhancer==1.0.0 @@ -67,12 +75,22 @@ django-taggit-autosuggest==0.2.7 django-taggit-templatetags==0.2.5 django-templatetag-sugar==1.0 easy-thumbnails==2.2 +greenlet==0.4.7 +iowait==0.2 lxml==3.4.4 +Mako==1.0.1 +MarkupSafe==0.23 micawber==0.3.2 ply==3.6 +psutil==2.2.1 pyquery==1.2.9 pytz==2015.4 +pyzmq==14.6.0 +simplejson==3.7.2 South==1.0.2 +tomako==0.1.0 +TornadIO2==0.0.4 +tornado==4.2 Unidecode==0.4.17 URLObject==2.4.0 YURL==0.13 From 24c263811ad9491b4a344f4a6a1d7abd186e5854 Mon Sep 17 00:00:00 2001 From: rscnt Date: Sun, 31 May 2015 04:52:53 -0600 Subject: [PATCH 18/21] settings: fixed typo on media. Signed-off-by: rscnt --- dynamicweb/settings.py | 3 ++- ungleich/migrations/0002_ungleichpage_image.py | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dynamicweb/settings.py b/dynamicweb/settings.py index 962b0615..16a1910f 100644 --- a/dynamicweb/settings.py +++ b/dynamicweb/settings.py @@ -260,8 +260,9 @@ STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, 'static') # Media files. -MEDIA_ROOT = os.path.abspath(os.path.join(BASE_DIR, '..', 'media')) +MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_URL = APP_ROOT_ENDPOINT + 'media/' +FILE_UPLOAD_PERMISSIONS = 0o644 # Templates confs TEMPLATE_DIRS = ( diff --git a/ungleich/migrations/0002_ungleichpage_image.py b/ungleich/migrations/0002_ungleichpage_image.py index b98b272f..44a6be64 100644 --- a/ungleich/migrations/0002_ungleichpage_image.py +++ b/ungleich/migrations/0002_ungleichpage_image.py @@ -8,7 +8,6 @@ import filer.fields.image class Migration(migrations.Migration): dependencies = [ - ('filer', '0002_auto_20150522_0450'), ('ungleich', '0001_initial'), ] From f3b560f60228c3203e9d7581cc5008d3e5118615 Mon Sep 17 00:00:00 2001 From: rscnt Date: Sun, 31 May 2015 05:32:11 -0600 Subject: [PATCH 19/21] settings: options for text editor and let host use x forwarded Signed-off-by: rscnt --- dynamicweb/settings.py | 4 +++- static/blog.ungleich.ch/css/clean-blog.css | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dynamicweb/settings.py b/dynamicweb/settings.py index 16a1910f..2ee2e704 100644 --- a/dynamicweb/settings.py +++ b/dynamicweb/settings.py @@ -316,7 +316,9 @@ THUMBNAIL_PROCESSORS = ( # django-cms-text-ckeditor TEXT_SAVE_IMAGE_FUNCTION='cmsplugin_filer_image.integrations.ckeditor.create_image_plugin' - +TEXT_ADDITIONAL_TAGS = ('iframe',) +TEXT_ADDITIONAL_ATTRIBUTES = ('scrolling', 'allowfullscreen', 'frameborder') +USE_X_FORWARDED_HOST = True try: from .local.local_settings import * except ImportError as e: diff --git a/static/blog.ungleich.ch/css/clean-blog.css b/static/blog.ungleich.ch/css/clean-blog.css index 30e12c42..c1df6431 100755 --- a/static/blog.ungleich.ch/css/clean-blog.css +++ b/static/blog.ungleich.ch/css/clean-blog.css @@ -396,4 +396,8 @@ body { .text-center { text-align: center; +} + +.blog-content img { + width: 100%; } \ No newline at end of file From 3338894c239c5f8963e3a1f7316b17bed6cfe75a Mon Sep 17 00:00:00 2001 From: rscnt Date: Sun, 31 May 2015 05:36:45 -0600 Subject: [PATCH 20/21] configs: added nginx conf example Signed-off-by: rscnt --- configs/nginx.proxy.conf | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/configs/nginx.proxy.conf b/configs/nginx.proxy.conf index acf288fa..4f9f3420 100644 --- a/configs/nginx.proxy.conf +++ b/configs/nginx.proxy.conf @@ -1,19 +1,20 @@ server { - listen 8081; + listen destruction.io:8080; server_name destruction.io; - location /static/ { - alias /home/r/dynamicweb/static; + location /static { + alias /home/r/dynamicweb/static/; } - location /media/ { - alias /home/r/dynamicweb/media; + location /media { + alias /home/r/dynamicweb/media/; } location / { - proxy_pass http://localhost:8080/; + proxy_pass http://127.0.0.1:8000/; proxy_pass_header Server; - proxy_set_header Host $host; + proxy_set_header Host $host:8080; + proxy_set_header X-Forwarded-Host $host:8080; proxy_redirect off; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; From 090df0798cda7cc93d37eb4e456e7829e873fe54 Mon Sep 17 00:00:00 2001 From: rscnt Date: Sun, 31 May 2015 05:36:57 -0600 Subject: [PATCH 21/21] configs: added circus config example. Signed-off-by: rscnt --- configs/circus.ungleich.ini | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configs/circus.ungleich.ini b/configs/circus.ungleich.ini index fdd83192..c64745ff 100644 --- a/configs/circus.ungleich.ini +++ b/configs/circus.ungleich.ini @@ -1,16 +1,17 @@ [circus] +check_delay = 5 endpoint = tcp://127.0.0.1:5555 pubsub_endpoint = tcp://127.0.0.1:5556 stats_endpoint = tcp://127.0.0.1:5557 [watcher:web] -cmd = /home/r/.virtualenvs/ungleich-django-cms/bin/chaussette --fd $(circus.sockets.web) --backend tornado dynamicweb.wsgi.application +cmd = /home/r/.virtualenvs/dynamicweb-blog/bin/chaussette --fd $(circus.sockets.web) --backend tornado dynamicweb.wsgi.application use_sockets = True numprocesses = 5 copy_env = True -virtualenv = /home/r/.virtualenvs/ungleich-django-cms +virtualenv = /home/r/.virtualenvs/dynamicweb-blog [socket:web] -host = 0.0.0.0 +host = 127.0.0.1 port = 8000 copy_env = True