Skip to content

Commit

Permalink
Config redis on platform.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrasband committed Jun 23, 2019
1 parent f2957cf commit 9abca40
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .platform.app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ crons:
if [ "$PLATFORM_BRANCH" = master ]; then
platform snapshot:create --yes --no-wait
fi
relationships:
applicationcache: "redisdata:redis"
3 changes: 3 additions & 0 deletions .platform/services.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
redisdata:
type: redis-persistent:5.0
disk: 1024
4 changes: 4 additions & 0 deletions pyslackersweb/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@
SLACK_INVITE_TOKEN = os.getenv("SLACK_INVITE_TOKEN", os.getenv("SLACK_OAUTH_TOKEN"))

SLACK_TOKEN = os.getenv("SLACK_TOKEN", os.getenv("SLACK_OAUTH_TOKEN"))

# We are running on platform.sh
if "PLATFORM_RELATIONSHIPS" in os.environ:
REDIS_URL = "redis://applicationcache.internal:6379/0"

0 comments on commit 9abca40

Please sign in to comment.