Commits

Guilherme Gondim committed 8109603

Minor adjustments for relad 0.1.1.

  • Participants
  • Parent commits 9e8e27e
  • Tags 0.1.1

Comments (0)

Files changed (9)

File etc/project-template/etc/crontab

-PYTHONPATH=~/{{ project_name }}
-DJANGO_SETTINGS_MODULE=settings_production
-
-15,45  *    * * *  ~/venv/bin/python ~/{{ project_name }}/manage.py update_feeds
-0      */6  * * *  ~/venv/bin/python ~/{{ project_name }}/manage.py mark_defunct_feeds
-10,40  *    * * *  ~/venv/bin/python ~/{{ project_name }}/manage.py update_index --verbosity=0
-0      12   * * *  ~/venv/bin/python ~/{{ project_name }}/manage.py update_index --verbosity=0 --remove

File etc/project-template/etc/crontab.sample

+PYTHONPATH={{ project_directory }}
+DJANGO_SETTINGS_MODULE=settings_production
+
+15,45  *    * * *  {{ project_directory }}/../venv/bin/python {{ project_directory }}/manage.py update_feeds
+0      */6  * * *  {{ project_directory }}/../venv/bin/python {{ project_directory }}/manage.py mark_defunct_feeds
+10,40  *    * * *  {{ project_directory }}/../venv/bin/python {{ project_directory }}/manage.py update_index --verbosity=0
+0      12   * * *  {{ project_directory }}/../venv/bin/python {{ project_directory }}/manage.py update_index --verbosity=0 --remove

File etc/project-template/etc/nginx

-# -*- mode: conf -*-
-# Ref.: https://github.com/benoitc/gunicorn/blob/master/examples/nginx.conf
-
-server {
-    listen              80;
-    # listen              443 ssl;
-    # ssl_certificate     /etc/nginx/ssl/{{ project_name }}.cert;
-    # ssl_certificate_key /etc/nginx/ssl/{{ project_name }}.key;
-
-    server_name    www.example.net;
-    client_max_body_size 4G;
-
-    # ~2 seconds is often enough for most folks to parse HTML/CSS and
-    # retrieve needed images/icons/frames, connections are cheap in
-    # nginx so increasing this is generally safe...
-    keepalive_timeout 5;
-
-    # Logs
-    # access_log  /var/log/nginx/{{ project_name }}-access.log;
-    # error_log   /var/log/nginx/{{ project_name }}-error.log;
-
-    # path for static files
-    location /static {    
-        autoindex off;    
-        access_log off;
-        expires max;
-        alias /path/to/{{ project_name }}/media/static/;    
-    }
-    location /media {    
-        autoindex off;    
-        expires max;
-        alias /path/to/{{ project_name }}/media/user/;    
-    }
-
-    # force admin to use https
-    # if ($ssl_protocol = "") {
-    #     rewrite ^/admin/(.*) https://$server_name/admin/$1 permanent;
-    # }
-
-    location / {
-      # an HTTP header important enough to have its own Wikipedia entry:
-      #   http://en.wikipedia.org/wiki/X-Forwarded-For
-      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-
-      # enable this if and only if you use HTTPS, this helps Rack
-      # set the proper protocol for doing redirects:
-      # proxy_set_header X-Forwarded-Proto https;
-
-      # pass the Host: header from the client right along so redirects
-      # can be set properly within the Rack application
-      proxy_set_header Host $http_host;
-
-      # we don't want nginx trying to do something clever with
-      # redirects, we set the Host: header above already.
-      proxy_redirect off;
-
-      # set "proxy_buffering off" *only* for Rainbows! when doing
-      # Comet/long-poll stuff.  It's also safe to set if you're
-      # using only serving fast clients with Unicorn + nginx.
-      # Otherwise you _want_ nginx to buffer responses to slow
-      # clients, really.
-      # proxy_buffering off;
-
-      # Try to serve static files from nginx, no point in making an
-      # *application* server like Unicorn/Rainbows! serve static files.
-      if (!-f $request_filename) {
-        proxy_pass http://127.0.0.1:8000;
-        break;
-      }
-    }
-
-    # Error pages
-    # error_page 500 502 503 504 /500.html;
-    # location = /500.html {
-    #  root /path/to/{{ project_name }}/media;
-    # }
-}

File etc/project-template/etc/nginx.sample

+# -*- mode: conf -*-
+# Ref.: https://github.com/benoitc/gunicorn/blob/master/examples/nginx.conf
+
+server {
+    listen              80;
+    # listen              443 ssl;
+    # ssl_certificate     /etc/nginx/ssl/{{ project_name }}.cert;
+    # ssl_certificate_key /etc/nginx/ssl/{{ project_name }}.key;
+
+    server_name    www.example.net;
+    client_max_body_size 4G;
+
+    # ~2 seconds is often enough for most folks to parse HTML/CSS and
+    # retrieve needed images/icons/frames, connections are cheap in
+    # nginx so increasing this is generally safe...
+    keepalive_timeout 5;
+
+    # Logs
+    # access_log  /var/log/nginx/{{ project_name }}-access.log;
+    # error_log   /var/log/nginx/{{ project_name }}-error.log;
+
+    # path for static files
+    location /static {    
+        autoindex off;    
+        access_log off;
+        expires max;
+        alias {{ project_directory }}/media/static/;    
+    }
+    location /media {    
+        autoindex off;    
+        expires max;
+        alias {{ project_directory }}/media/user/;    
+    }
+
+    # force admin to use https
+    # if ($ssl_protocol = "") {
+    #     rewrite ^/admin/(.*) https://$server_name/admin/$1 permanent;
+    # }
+
+    location / {
+      # an HTTP header important enough to have its own Wikipedia entry:
+      #   http://en.wikipedia.org/wiki/X-Forwarded-For
+      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+
+      # enable this if and only if you use HTTPS, this helps Rack
+      # set the proper protocol for doing redirects:
+      # proxy_set_header X-Forwarded-Proto https;
+
+      # pass the Host: header from the client right along so redirects
+      # can be set properly within the Rack application
+      proxy_set_header Host $http_host;
+
+      # we don't want nginx trying to do something clever with
+      # redirects, we set the Host: header above already.
+      proxy_redirect off;
+
+      # set "proxy_buffering off" *only* for Rainbows! when doing
+      # Comet/long-poll stuff.  It's also safe to set if you're
+      # using only serving fast clients with Unicorn + nginx.
+      # Otherwise you _want_ nginx to buffer responses to slow
+      # clients, really.
+      # proxy_buffering off;
+
+      # Try to serve static files from nginx, no point in making an
+      # *application* server like Unicorn/Rainbows! serve static files.
+      if (!-f $request_filename) {
+        proxy_pass http://127.0.0.1:8000;
+        break;
+      }
+    }
+
+    # Error pages
+    # error_page 500 502 503 504 /500.html;
+    # location = /500.html {
+    #  root {{ project_directory }}/media;
+    # }
+}

File etc/project-template/etc/supervisord

-# -*- mode: conf -*-
-[program:{{ project_name }}]
-command=/path/to/venv/bin/gunicorn_django --pythonpath=/path/to/{{ project_name }} --settings=settings_production -b 127.0.0.1:8000
-directory=/path/to/{{ project_name }}
-user={{ project_name }}
-autostart=true
-autorestart=true
-redirect_stderr=True
-stderr_logfile=/dev/null
-stdout_logfile=/var/log/supervisor/{{ project_name }}.log

File etc/project-template/etc/supervisord.sample

+# -*- mode: conf -*-
+[program:{{ project_name }}]
+user={{ project_name }}
+environment=DJANGO_SETTINGS_MODULE=settings_production
+directory={{ project_directory }}
+command={{ project_directory }}/../venv/bin/gunicorn_django -b 127.0.0.1:8000
+autostart=true
+autorestart=true
+redirect_stderr=True
+stderr_logfile=/dev/null
+stdout_logfile=/var/log/supervisor/{{ project_name }}.log

File etc/project-template/requirements.txt

 Django>=1.5,<1.6
 South==0.7.6
 gunicorn<0.18
-django-agregador==0.1
-planeta==0.1
+planeta==0.1.1
 #django-redis
 #psycopg2

File planeta/__init__.py

-VERSION = (0, 1)
+VERSION = (0, 1, 1)
 
 
 def get_version():
     install_requires=[
         'Whoosh==2.4.1',
         'django-haystack==1.2.7',
+        'django-agregador>=0.2'
     ],
 )