From 1e743a4b51822d587e0283f3fde8f753876ed7b2 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Mon, 10 Jan 2022 09:38:40 -0800 Subject: [PATCH] updating configs for prod launch --- env-example | 13 +++++++++++-- suchwowx/config.py | 8 ++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/env-example b/env-example index f7c61af..dfce0ea 100644 --- a/env-example +++ b/env-example @@ -1,2 +1,11 @@ -DATA_FOLDER=/home/yourname/git/github.com/lalanza808/suchwowx/data -SECRET_KEY=mycrazyrandomstring +# Production env - delete this line and unused config +SECRET_KEY=vrBWMR2$nCdPuZ27 +DATA_FOLDER=/opt/suchwowx/data +SERVER_NAME=myservername.com +AVAX_RPC=https://api.avax.network/ext/bc/C/rpc +CONTRACT_TESTNET=0 + + +# Test env - delete this line and unused config +SECRET_KEY=vrBWMR2$nCdPuZ27 +DATA_FOLDER=/opt/suchwowx/data diff --git a/suchwowx/config.py b/suchwowx/config.py index 81dcca5..5939bb3 100644 --- a/suchwowx/config.py +++ b/suchwowx/config.py @@ -10,10 +10,6 @@ SERVER_NAME = getenv('SERVER_NAME', '127.0.0.1:5000') IPFS_SERVER = getenv('IPFS_SERVER', 'http://127.0.0.1:8080') AVAX_RPC = getenv('AVAX_RPC', 'https://api.avax-test.network/ext/bc/C/rpc') -# Cache -CACHE_HOST = getenv('CACHE_HOST', 'localhost') -CACHE_PORT = getenv('CACHE_PORT', 6379) - # Uploads SESSION_TYPE = 'filesystem' ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif', 'svg', 'mp4', 'webp'} @@ -21,9 +17,9 @@ MAX_CONTENT_LENGTH = 32 * 1024 * 1024 TEMPLATES_AUTO_RELOAD = getenv('TEMPLATES_AUTO_RELOAD', True) # Contract -CONTRACT_TESTNET = getenv('TESTNET', True) +CONTRACT_TESTNET = getenv('TESTNET', 1) CONTRACT_OWNER = 'lzamenace.eth' -if CONTRACT_TESTNET: +if int(CONTRACT_TESTNET) == 1: WOWX_ADDRESS = '0xc6B039b1e0be1ba0B433f319898438E782E5dEBA' # WOWX testnet CONTRACT_ADDRESS = '0xE1b6483729557E539cfD9c3Bdb754C54c16cFCe7' # SWX testnet else: