1 # -*- coding: utf-8 -*-
2 from fnpdeploy import *
5 from fabfile_local import *
10 env.project_name = 'wolnelektury'
13 class ManageTask(Task):
14 def __init__(self, name, params='', **kwargs):
15 super(ManageTask, self).__init__(**kwargs)
20 require('app_path', 'project_name')
21 with cd(get_django_root_path('current')):
22 run('source %(ve)s/bin/activate && python manage.py %(task)s %(params)s' % {
25 'params': self.params,
29 class Memcached(Service):
31 print '>>> memcached: restart'
32 sudo('/etc/init.d/memcached restart', shell=False)
37 env.hosts = ['giewont.icm.edu.pl']
39 env.app_path = '/srv/wolnelektury.pl'
40 env.django_root_path = 'src'
41 env.requirements_file = 'requirements/requirements.txt'
42 env.pre_collectstatic = [
43 ManageTask('update_counters'),
46 Supervisord('wolnelektury'),
47 Supervisord('wolnelektury.celery'),
54 env.hosts = ['giewont.icm.edu.pl']
56 env.app_path = '/srv/wolnelektury.pl/beta'
57 env.ve = '/srv/wolnelektury.pl/ve'
58 env.django_root_path = 'src'
59 env.requirements_file = 'requirements/requirements.txt'
60 env.pre_collectstatic = [
61 ManageTask('update_counters'),
70 env.hosts = ['san.nowoczesnapolska.org.pl:2223']
72 env.app_path = '/home/staging/wolnelektury.pl'
74 DebianGunicorn('wolnelektury'),