remove legacy settings
parent
0287eb3c9e
commit
2b609f5fe3
|
@ -1,36 +0,0 @@
|
||||||
# http://docs.celeryproject.org/en/latest/cookbook/daemonizing.html#generic-initd-celerybeat-example
|
|
||||||
# to be placed at /etc/defaults/celerybeat
|
|
||||||
|
|
||||||
# Where to chdir at start.
|
|
||||||
CELERYBEAT_CHDIR="/opt/regluit/"
|
|
||||||
|
|
||||||
# Extra arguments to celerybeat
|
|
||||||
#CELERYBEAT_OPTS="--schedule=/var/run/celerybeat-schedule"
|
|
||||||
|
|
||||||
# Name of the celery config module.#
|
|
||||||
CELERY_CONFIG_MODULE="celeryconfig"
|
|
||||||
|
|
||||||
# Name of the projects settings module.
|
|
||||||
export DJANGO_SETTINGS_MODULE="regluit.settings.just"
|
|
||||||
|
|
||||||
# Path to celerybeat
|
|
||||||
CELERYBEAT="/opt/regluit/ENV/bin/django-admin.py celerybeat"
|
|
||||||
|
|
||||||
# virtualenv to use
|
|
||||||
VIRTUALENV="/opt/regluit/ENV"
|
|
||||||
|
|
||||||
#Full path to the PID file. Default is /var/run/celeryd.pid
|
|
||||||
CELERYBEAT_PIDFILE="/var/log/celerybeat/celerybeat.pid"
|
|
||||||
|
|
||||||
#Full path to the celeryd log file. Default is /var/log/celeryd.log
|
|
||||||
CELERYBEAT_LOGFILE="/var/log/celerybeat/celerybeat.log"
|
|
||||||
|
|
||||||
#Log level to use for celeryd. Default is INFO.
|
|
||||||
CELERYBEAT_LOG_LEVEL="INFO"
|
|
||||||
|
|
||||||
|
|
||||||
#User to run celeryd as. Default is current user.
|
|
||||||
#CELERYBEAT_USER
|
|
||||||
|
|
||||||
#Group to run celeryd as. Default is current user.
|
|
||||||
#CELERYBEAT_GROUP
|
|
|
@ -1,36 +0,0 @@
|
||||||
# http://docs.celeryproject.org/en/latest/cookbook/daemonizing.html#generic-initd-celerybeat-example
|
|
||||||
# to be placed at /etc/defaults/celerybeat
|
|
||||||
|
|
||||||
# Where to chdir at start.
|
|
||||||
CELERYBEAT_CHDIR="/opt/regluit/"
|
|
||||||
|
|
||||||
# Extra arguments to celerybeat
|
|
||||||
#CELERYBEAT_OPTS="--schedule=/var/run/celerybeat-schedule"
|
|
||||||
|
|
||||||
# Name of the celery config module.#
|
|
||||||
CELERY_CONFIG_MODULE="celeryconfig"
|
|
||||||
|
|
||||||
# Name of the projects settings module.
|
|
||||||
export DJANGO_SETTINGS_MODULE="regluit.settings.please"
|
|
||||||
|
|
||||||
# Path to celerybeat
|
|
||||||
CELERYBEAT="/opt/regluit/ENV/bin/django-admin.py celerybeat"
|
|
||||||
|
|
||||||
# virtualenv to use
|
|
||||||
VIRTUALENV="/opt/regluit/ENV"
|
|
||||||
|
|
||||||
#Full path to the PID file. Default is /var/run/celeryd.pid
|
|
||||||
CELERYBEAT_PIDFILE="/var/log/celerybeat/celerybeat.pid"
|
|
||||||
|
|
||||||
#Full path to the celeryd log file. Default is /var/log/celeryd.log
|
|
||||||
CELERYBEAT_LOGFILE="/var/log/celerybeat/celerybeat.log"
|
|
||||||
|
|
||||||
#Log level to use for celeryd. Default is INFO.
|
|
||||||
CELERYBEAT_LOG_LEVEL="INFO"
|
|
||||||
|
|
||||||
|
|
||||||
#User to run celeryd as. Default is current user.
|
|
||||||
#CELERYBEAT_USER
|
|
||||||
|
|
||||||
#Group to run celeryd as. Default is current user.
|
|
||||||
#CELERYBEAT_GROUP
|
|
|
@ -1,36 +0,0 @@
|
||||||
# http://docs.celeryproject.org/en/latest/cookbook/daemonizing.html#generic-initd-celerybeat-example
|
|
||||||
# to be placed at /etc/defaults/celerybeat
|
|
||||||
|
|
||||||
# Where to chdir at start.
|
|
||||||
CELERYBEAT_CHDIR="/home/ubuntu/regluit/"
|
|
||||||
|
|
||||||
# Extra arguments to celerybeat
|
|
||||||
#CELERYBEAT_OPTS="--schedule=/var/run/celerybeat-schedule"
|
|
||||||
|
|
||||||
# Name of the celery config module.#
|
|
||||||
CELERY_CONFIG_MODULE="celeryconfig"
|
|
||||||
|
|
||||||
# Name of the projects settings module.
|
|
||||||
export DJANGO_SETTINGS_MODULE="regluit.settings.me"
|
|
||||||
|
|
||||||
# Path to celerybeat
|
|
||||||
CELERYBEAT="/home/ubuntu/.virtualenvs/regluit/bin/django-admin.py celerybeat"
|
|
||||||
|
|
||||||
# virtualenv to use
|
|
||||||
VIRTUALENV="/home/ubuntu/.virtualenvs/regluit"
|
|
||||||
|
|
||||||
#Full path to the PID file. Default is /var/run/celeryd.pid
|
|
||||||
CELERYBEAT_PIDFILE="/var/log/celerybeat/celerybeat.pid"
|
|
||||||
|
|
||||||
#Full path to the celeryd log file. Default is /var/log/celeryd.log
|
|
||||||
CELERYBEAT_LOGFILE="/var/log/celerybeat/celerybeat.log"
|
|
||||||
|
|
||||||
#Log level to use for celeryd. Default is INFO.
|
|
||||||
CELERYBEAT_LOG_LEVEL="INFO"
|
|
||||||
|
|
||||||
|
|
||||||
#User to run celeryd as. Default is current user.
|
|
||||||
#CELERYBEAT_USER
|
|
||||||
|
|
||||||
#Group to run celeryd as. Default is current user.
|
|
||||||
#CELERYBEAT_GROUP
|
|
|
@ -1,11 +0,0 @@
|
||||||
CELERYD_NODES="w1"
|
|
||||||
CELERYD_CHDIR="/opt/regluit/"
|
|
||||||
CELERYD_LOG_FILE="/var/log/celery/%n.log"
|
|
||||||
CELERYD_PID_FILE="/var/log/celery/%n.pid"
|
|
||||||
CELERYD_USER="celery"
|
|
||||||
CELERYD_GROUP="celery"
|
|
||||||
CELERYD="/opt/regluit/ENV/bin/django-admin.py celeryd"
|
|
||||||
CELERYD_MULTI="/opt/regluit/ENV/bin/django-admin.py celeryd_multi"
|
|
||||||
|
|
||||||
VIRTUALENV_ACTIVATE="/opt/regluit/ENV/bin/activate"
|
|
||||||
export DJANGO_SETTINGS_MODULE="regluit.settings.just"
|
|
|
@ -1,11 +0,0 @@
|
||||||
CELERYD_NODES="w1"
|
|
||||||
CELERYD_CHDIR="/opt/regluit/"
|
|
||||||
CELERYD_LOG_FILE="/var/log/celery/%n.log"
|
|
||||||
CELERYD_PID_FILE="/var/log/celery/%n.pid"
|
|
||||||
CELERYD_USER="celery"
|
|
||||||
CELERYD_GROUP="celery"
|
|
||||||
CELERYD="/opt/regluit/ENV/bin/django-admin.py celeryd"
|
|
||||||
CELERYD_MULTI="/opt/regluit/ENV/bin/django-admin.py celeryd_multi"
|
|
||||||
|
|
||||||
VIRTUALENV_ACTIVATE="/opt/regluit/ENV/bin/activate"
|
|
||||||
export DJANGO_SETTINGS_MODULE="regluit.settings.please"
|
|
|
@ -1,11 +0,0 @@
|
||||||
CELERYD_NODES="w1"
|
|
||||||
CELERYD_CHDIR="/home/ubuntu/regluit/"
|
|
||||||
CELERYD_LOG_FILE="/var/log/celery/%n.log"
|
|
||||||
CELERYD_PID_FILE="/var/log/celery/%n.pid"
|
|
||||||
CELERYD_USER="celery"
|
|
||||||
CELERYD_GROUP="celery"
|
|
||||||
CELERYD="/home/ubuntu/.virtualenvs/regluit/bin/django-admin.py celeryd"
|
|
||||||
CELERYD_MULTI="/home/ubuntu/.virtualenvs/regluit/bin/django-admin.py celeryd_multi"
|
|
||||||
|
|
||||||
VIRTUALENV_ACTIVATE="/home/ubuntu/.virtualenvs/regluit/bin/activate"
|
|
||||||
export DJANGO_SETTINGS_MODULE="regluit.settings.me"
|
|
|
@ -1,24 +0,0 @@
|
||||||
# Edit this file to introduce tasks to be run by cron.
|
|
||||||
#
|
|
||||||
# Each task to run has to be defined through a single line
|
|
||||||
# indicating with different fields when the task will be run
|
|
||||||
# and what command to run for the task
|
|
||||||
#
|
|
||||||
# To define the time you can provide concrete values for
|
|
||||||
# minute (m), hour (h), day of month (dom), month (mon),
|
|
||||||
# and day of week (dow) or use '*' in these fields (for 'any').#
|
|
||||||
# Notice that tasks will be started based on the cron's system
|
|
||||||
# daemon's notion of time and timezones.
|
|
||||||
#
|
|
||||||
# Output of the crontab jobs (including errors) is sent through
|
|
||||||
# email to the user the crontab file belongs to (unless redirected).
|
|
||||||
#
|
|
||||||
# For example, you can run a backup of all your user accounts
|
|
||||||
# at 5 a.m every week with:
|
|
||||||
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
|
|
||||||
#
|
|
||||||
# For more information see the manual pages of crontab(5) and cron(8)
|
|
||||||
#
|
|
||||||
# m h dom mon dow command
|
|
||||||
* * * * * cd /opt/regluit; . /opt/regluit/ENV/bin/activate; /opt/regluit/ENV/bin/django-admin.py emit_notices --settings=regluit.settings.just > /opt/regluit/deploy/emit_notices.log 2>&1 ; touch /opt/regluit/deploy/last-cron
|
|
||||||
@reboot sudo mkdir /var/run/celery; sudo chown celery:celery /var/log/celery /var/run/celery; cd /opt/regluit; . /opt/regluit/ENV/bin/activate; /opt/regluit/ENV/bin/django-admin.py celeryd_multi restart w1 --settings=regluit.settings.just; /etc/init.d/celerybeat restart;
|
|
|
@ -1,24 +0,0 @@
|
||||||
# Edit this file to introduce tasks to be run by cron.
|
|
||||||
#
|
|
||||||
# Each task to run has to be defined through a single line
|
|
||||||
# indicating with different fields when the task will be run
|
|
||||||
# and what command to run for the task
|
|
||||||
#
|
|
||||||
# To define the time you can provide concrete values for
|
|
||||||
# minute (m), hour (h), day of month (dom), month (mon),
|
|
||||||
# and day of week (dow) or use '*' in these fields (for 'any').#
|
|
||||||
# Notice that tasks will be started based on the cron's system
|
|
||||||
# daemon's notion of time and timezones.
|
|
||||||
#
|
|
||||||
# Output of the crontab jobs (including errors) is sent through
|
|
||||||
# email to the user the crontab file belongs to (unless redirected).
|
|
||||||
#
|
|
||||||
# For example, you can run a backup of all your user accounts
|
|
||||||
# at 5 a.m every week with:
|
|
||||||
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
|
|
||||||
#
|
|
||||||
# For more information see the manual pages of crontab(5) and cron(8)
|
|
||||||
#
|
|
||||||
# m h dom mon dow command
|
|
||||||
* * * * * cd /opt/regluit; . /opt/regluit/ENV/bin/activate; /opt/regluit/ENV/bin/django-admin.py emit_notices --settings=regluit.settings.please > /opt/regluit/deploy/emit_notices.log 2>&1 ; touch /opt/regluit/deploy/last-cron
|
|
||||||
@reboot sudo mkdir /var/run/celery; sudo chown celery:celery /var/log/celery /var/run/celery; cd /opt/regluit; . /opt/regluit/ENV/bin/activate; /opt/regluit/ENV/bin/django-admin.py celeryd_multi restart w1 --settings=regluit.settings.please; /etc/init.d/celerybeat restart;
|
|
|
@ -1,3 +0,0 @@
|
||||||
cd /opt/regluit
|
|
||||||
source ENV/bin/activate
|
|
||||||
export DJANGO_SETTINGS_MODULE=regluit.settings.just
|
|
|
@ -1,3 +0,0 @@
|
||||||
cd /opt/regluit
|
|
||||||
source ENV/bin/activate
|
|
||||||
export DJANGO_SETTINGS_MODULE=regluit.settings.please
|
|
125
settings/just.py
125
settings/just.py
|
@ -1,125 +0,0 @@
|
||||||
# coding=utf-8
|
|
||||||
from .common import *
|
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['.unglue.it']
|
|
||||||
DEBUG = False
|
|
||||||
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
|
|
||||||
|
|
||||||
SITE_ID = 5
|
|
||||||
|
|
||||||
ADMINS = (
|
|
||||||
('Raymond Yee', 'rdhyee+ungluebugs@gluejar.com'),
|
|
||||||
('Eric Hellman', 'eric@gluejar.com'),
|
|
||||||
)
|
|
||||||
|
|
||||||
MANAGERS = ADMINS
|
|
||||||
|
|
||||||
DATABASES = {
|
|
||||||
'default': {
|
|
||||||
'ENGINE': 'django.db.backends.mysql',
|
|
||||||
'NAME': 'unglueit',
|
|
||||||
'USER': DATABASE_USER,
|
|
||||||
'PASSWORD': DATABASE_PASSWORD,
|
|
||||||
'HOST': DATABASE_HOST,
|
|
||||||
'PORT': '',
|
|
||||||
'TEST': {
|
|
||||||
'CHARSET': 'utf8',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TIME_ZONE = 'America/New_York'
|
|
||||||
|
|
||||||
# settings for outbout email
|
|
||||||
# if you have a gmail account you can use your email address and password
|
|
||||||
|
|
||||||
# Amazon SES
|
|
||||||
|
|
||||||
MAIL_USE_TLS = True
|
|
||||||
EMAIL_HOST = 'email-smtp.us-east-1.amazonaws.com'
|
|
||||||
EMAIL_PORT = 465
|
|
||||||
DEFAULT_FROM_EMAIL = 'notices@gluejar.com'
|
|
||||||
|
|
||||||
# send celery log to Python logging
|
|
||||||
CELERYD_HIJACK_ROOT_LOGGER = False
|
|
||||||
|
|
||||||
# Next step to try https
|
|
||||||
#BASE_URL = 'http://just.unglue.it'
|
|
||||||
BASE_URL_SECURE = 'https://just.unglue.it'
|
|
||||||
IPN_SECURE_URL = False
|
|
||||||
|
|
||||||
# use redis for production queue
|
|
||||||
BROKER_URL = "redis://localhost:6379/0"
|
|
||||||
|
|
||||||
LOGGING = {
|
|
||||||
'version': 1,
|
|
||||||
'disable_existing_loggers': True,
|
|
||||||
'formatters': {
|
|
||||||
'brief': {
|
|
||||||
'format': '%(asctime)s %(levelname)s %(name)s[%(funcName)s]: %(message)s',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'handlers': {
|
|
||||||
'mail_admins': {
|
|
||||||
'level': 'ERROR',
|
|
||||||
'class': 'django.utils.log.AdminEmailHandler'
|
|
||||||
},
|
|
||||||
'null': {
|
|
||||||
'level': 'DEBUG',
|
|
||||||
'class': 'logging.NullHandler',
|
|
||||||
},
|
|
||||||
'file': {
|
|
||||||
'level': 'INFO',
|
|
||||||
'class': 'logging.handlers.RotatingFileHandler',
|
|
||||||
'filename': join('/var/log/regluit', 'unglue.it.log'),
|
|
||||||
'maxBytes': 1024*1024*5, # 5 MB
|
|
||||||
'backupCount': 5,
|
|
||||||
'formatter': 'brief',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'loggers': {
|
|
||||||
'django.request': {
|
|
||||||
'handlers': ['mail_admins'],
|
|
||||||
'level': 'ERROR',
|
|
||||||
'propagate': True,
|
|
||||||
},
|
|
||||||
'django.security.DisallowedHost': {
|
|
||||||
'handlers': ['null'],
|
|
||||||
'propagate': False,
|
|
||||||
},
|
|
||||||
'': {
|
|
||||||
'handlers': ['file'],
|
|
||||||
'level': 'WARNING',
|
|
||||||
'propagate': False,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
STATIC_ROOT = '/var/www/static'
|
|
||||||
#CKEDITOR_UPLOAD_PATH = '/var/www/static/media/'
|
|
||||||
#CKEDITOR_UPLOAD_PREFIX = 'https://just.unglue.it/static/media/'
|
|
||||||
|
|
||||||
IS_PREVIEW = False
|
|
||||||
|
|
||||||
# decide which of the period tasks to add to the schedule
|
|
||||||
CELERYBEAT_SCHEDULE['send_test_email'] = SEND_TEST_EMAIL_JOB
|
|
||||||
CELERYBEAT_SCHEDULE['report_new_ebooks'] = EBOOK_NOTIFICATIONS_JOB
|
|
||||||
|
|
||||||
|
|
||||||
CELERYBEAT_SCHEDULE['update_account_statuses'] = UPDATE_ACCOUNT_STATUSES
|
|
||||||
CELERYBEAT_SCHEDULE['notify_expiring_accounts'] = NOTIFY_EXPIRING_ACCOUNTS
|
|
||||||
CELERYBEAT_SCHEDULE['refresh_acqs'] = REFRESH_ACQS_JOB
|
|
||||||
|
|
||||||
|
|
||||||
# set -- sandbox or production Amazon FPS?
|
|
||||||
AMAZON_FPS_HOST = "fps.sandbox.amazonaws.com"
|
|
||||||
#AMAZON_FPS_HOST = "fps.amazonaws.com"
|
|
||||||
|
|
||||||
# local settings for maintenance mode
|
|
||||||
MAINTENANCE_MODE = False
|
|
||||||
|
|
||||||
# if settings/local.py exists, import those settings -- allows for dynamic generation of parameters such as DATABASES
|
|
||||||
try:
|
|
||||||
from regluit.settings.local import *
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
|
@ -1,114 +0,0 @@
|
||||||
from regluit.settings.common import *
|
|
||||||
|
|
||||||
ALLOWED_HOSTS = ['.unglue.it']
|
|
||||||
DEBUG = False
|
|
||||||
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
|
|
||||||
|
|
||||||
SITE_ID = 2
|
|
||||||
|
|
||||||
ADMINS = (
|
|
||||||
('Raymond Yee', 'rdhyee+ungluebugs@gluejar.com'),
|
|
||||||
('Eric Hellman', 'eric@gluejar.com'),
|
|
||||||
)
|
|
||||||
|
|
||||||
MANAGERS = ADMINS
|
|
||||||
|
|
||||||
DATABASES = {
|
|
||||||
'default': {
|
|
||||||
'ENGINE': 'django.db.backends.mysql',
|
|
||||||
'NAME': 'regluit',
|
|
||||||
'USER': DATABASE_USER,
|
|
||||||
'PASSWORD': DATABASE_PASSWORD,
|
|
||||||
'HOST': DATABASE_HOST,
|
|
||||||
'PORT': '',
|
|
||||||
'TEST': {
|
|
||||||
'CHARSET': 'utf8',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
TIME_ZONE = 'America/New_York'
|
|
||||||
|
|
||||||
# settings for outbout email
|
|
||||||
# if you have a gmail account you can use your email address and password
|
|
||||||
|
|
||||||
# Amazon SES
|
|
||||||
MAIL_USE_TLS = True
|
|
||||||
EMAIL_HOST = 'email-smtp.us-east-1.amazonaws.com'
|
|
||||||
EMAIL_PORT = 465
|
|
||||||
DEFAULT_FROM_EMAIL = 'notices@gluejar.com'
|
|
||||||
|
|
||||||
# send celery log to Python logging
|
|
||||||
CELERYD_HIJACK_ROOT_LOGGER = False
|
|
||||||
|
|
||||||
# Next step to try https
|
|
||||||
#BASE_URL = 'http://please.unglueit.com'
|
|
||||||
BASE_URL_SECURE = 'https://please.unglueit.com'
|
|
||||||
|
|
||||||
# use redis for production queue
|
|
||||||
BROKER_URL = "redis://localhost:6379/0"
|
|
||||||
|
|
||||||
LOGGING = {
|
|
||||||
'version': 1,
|
|
||||||
'disable_existing_loggers': True,
|
|
||||||
'formatters': {
|
|
||||||
'brief': {
|
|
||||||
'format': '%(asctime)s %(levelname)s %(name)s[%(funcName)s]: %(message)s',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'handlers': {
|
|
||||||
'mail_admins': {
|
|
||||||
'level': 'ERROR',
|
|
||||||
'class': 'django.utils.log.AdminEmailHandler'
|
|
||||||
},
|
|
||||||
'null': {
|
|
||||||
'level': 'DEBUG',
|
|
||||||
'class': 'logging.NullHandler',
|
|
||||||
},
|
|
||||||
'file': {
|
|
||||||
'level': 'INFO',
|
|
||||||
'class': 'logging.handlers.RotatingFileHandler',
|
|
||||||
'filename': join('/var/log/regluit', 'unglue.it.log'),
|
|
||||||
'maxBytes': 1024*1024*5, # 5 MB
|
|
||||||
'backupCount': 5,
|
|
||||||
'formatter': 'brief',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'loggers': {
|
|
||||||
'django.request': {
|
|
||||||
'handlers': ['mail_admins'],
|
|
||||||
'level': 'ERROR',
|
|
||||||
'propagate': True,
|
|
||||||
},
|
|
||||||
'django.security.DisallowedHost': {
|
|
||||||
'handlers': ['null'],
|
|
||||||
'propagate': False,
|
|
||||||
},
|
|
||||||
'': {
|
|
||||||
'handlers': ['file'],
|
|
||||||
'level': 'WARNING',
|
|
||||||
'propagate': False,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
STATIC_ROOT = '/var/www/static'
|
|
||||||
CKEDITOR_UPLOAD_PATH = '/var/www/static/media/'
|
|
||||||
|
|
||||||
IS_PREVIEW = False
|
|
||||||
|
|
||||||
# decide which of the period tasks to add to the schedule
|
|
||||||
#CELERYBEAT_SCHEDULE['send_test_email'] = SEND_TEST_EMAIL_JOB
|
|
||||||
CELERYBEAT_SCHEDULE['report_new_ebooks'] = EBOOK_NOTIFICATIONS_JOB
|
|
||||||
|
|
||||||
|
|
||||||
# local settings for maintenance mode
|
|
||||||
MAINTENANCE_MODE = False
|
|
||||||
|
|
||||||
|
|
||||||
# if settings/local.py exists, import those settings -- allows for dynamic generation of parameters such as DATABASES
|
|
||||||
try:
|
|
||||||
from regluit.settings.local import *
|
|
||||||
except ImportError:
|
|
||||||
pass
|
|
Loading…
Reference in New Issue