From c6c195b016195357e6d72ec6a2ebe0239ca5bcbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C4=93teris=20Caune?= Date: Sat, 28 Jan 2017 12:38:52 +0200 Subject: [PATCH] local_settings.py.example --- README.md | 11 ++++++----- hc/local_settings.py.example | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 hc/local_settings.py.example diff --git a/README.md b/README.md index 5322946c..dc4c6fc7 100644 --- a/README.md +++ b/README.md @@ -46,11 +46,12 @@ in development environment. $ pip install -r healthchecks/requirements.txt -* make sure PostgreSQL server is installed and running, create - database "hc": +* healthchecks is configured to use a SQLite database by default. To use + PostgreSQL or MySQL database, create and edit `hc/local_settings.py` file. + There is a template you can copy and edit as needed: - $ psql --user postgres - postgres=# create database hc; + $ cd ~/webapps/healthchecks + $ cp hc/local_settings.py.example hc/local_settings.py * create database tables and the superuser account: @@ -78,7 +79,7 @@ Some useful settings keys to override are: `SITE_ROOT` is used to build fully qualified URLs for pings, and for use in emails and notifications. Example: - SITE_ROOT = "https://my-monitoring-project.com"` + SITE_ROOT = "https://my-monitoring-project.com" `SITE_NAME` has the default value of "healthchecks.io" and is used throughout the templates. Replace it with your own name to personalize your installation. diff --git a/hc/local_settings.py.example b/hc/local_settings.py.example new file mode 100644 index 00000000..bd90d72c --- /dev/null +++ b/hc/local_settings.py.example @@ -0,0 +1,25 @@ +# SITE_ROOT = "https://my-monitoring-project.com" +# SITE_NAME = "My Monitoring Project" +# DEFAULT_FROM_EMAIL = "noreply@my-monitoring-project.com" + +# Uncomment to use Postgres: +# DATABASES = { +# 'default': { +# 'ENGINE': 'django.db.backends.postgresql', +# 'NAME': 'your-database-name-here', +# 'USER': 'your-database-user-here', +# 'PASSWORD': 'your-database-password-here', +# 'TEST': {'CHARSET': 'UTF8'} +# } +# } + +# Uncomment to use MySQL: +# DATABASES = { +# 'default': { +# 'ENGINE': 'django.db.backends.mysql', +# 'NAME': 'your-database-name-here', +# 'USER': 'your-database-user-here', +# 'PASSWORD': 'your-database-password-here', +# 'TEST': {'CHARSET': 'UTF8'} +# } +# }