Browse Source

Setup for Whoosh.

master
Nick Sergeant 3 years ago
parent
commit
106df16e15
2 changed files with 9 additions and 1 deletions
  1. +2
    -1
      README.md
  2. +7
    -0
      settings.py

+ 2
- 1
README.md View File

@@ -24,7 +24,8 @@
- `scp snipt.dump nsergeant@server.nicksergeant.com:/home/nsergeant`
- `dokku postgres:connect snippets < snipt.dump`
- `dokku domains:add snippets snippets.siftie.com`
- `dokku config:set DOKKU_LETSENCRYPT_EMAIL=team@siftie.com SECRET_KEY=<some-secret-key> USE_SSL=true`
- `dokku config:set DOKKU_LETSENCRYPT_EMAIL=team@siftie.com SECRET_KEY=<some-secret-key> USE_SSL=true WHOOSH_PATH=/app/snippets-whoosh`
- `dokku storage:mount snippets /var/lib/dokku/data/storage/snippets-whoosh:/app/snippets-whoosh`
- `git remote add dokku dokku@server.nicksergeant.com:snippets`
- `git push dokku`



+ 7
- 0
settings.py View File

@@ -18,6 +18,13 @@ CORS_ORIGIN_ALLOW_ALL = True
DEBUG = True if "DEBUG" in os.environ else False
DEFAULT_FROM_EMAIL = os.environ.get("POSTMARK_EMAIL", "support@siftie.com")
EMAIL_BACKEND = "postmark.django_backend.EmailBackend"
HAYSTACK_CONNECTIONS = {
"default": {
"ENGINE": "haystack.backends.whoosh_backend.WhooshEngine",
"PATH": os.environ.get("WHOOSH_PATH", "./.whoosh_index"),
"STORAGE": "file",
}
}
HAYSTACK_SIGNAL_PROCESSOR = "haystack.signals.RealtimeSignalProcessor"
INTERNAL_IPS = ("127.0.0.1",)
LANGUAGE_CODE = "en-us"


Loading…
Cancel
Save