-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.environment
26 lines (25 loc) · 1.9 KB
/
.environment
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Blackfire.
export FLASK_APP=server.py
# PostgreSQL.
export DB_NAME=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].path")
export DB_HOST=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].host")
export DB_PORT=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].port")
export DB_USER=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].username")
export DB_PASSWORD=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".database[0].password")
# MariaDB/MySQL.
# export DB_NAME_MYSQL=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".mysqldatabase[0].path")
# export DB_HOST_MYSQL=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".mysqldatabase[0].host")
# export DB_PORT_MYSQL=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".mysqldatabase[0].port")
# export DB_USER_MYSQL=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".mysqldatabase[0].username")
# Memcached.
# export CACHE_HOST_MEMCACHED=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".memcachedcache[0].host")
# export CACHE_PORT_MEMCACHED=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".memcachedcache[0].port")
# export CACHE_LOCATION_MEMCACHED=$CACHE_HOST_MEMCACHED:$CACHE_PORT_MEMCACHED
# Redis.
export CACHE_SCHEME_REDIS=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".rediscache[0].scheme")
export CACHE_USER_REDIS=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".rediscache[0].username")
export CACHE_PW_REDIS=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".rediscache[0].password")
export CACHE_HOST_REDIS=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".rediscache[0].host")
export CACHE_PORT_REDIS=$(echo $PLATFORM_RELATIONSHIPS | base64 --decode | jq -r ".rediscache[0].port")
# Updates PATH when Poetry is used, making it available during deploys and SSH.
export PATH="/app/.local/bin:$PATH"