Skip to content
Permalink
Browse files

specifying mementoembed endpoint via ENV instead of hard-code, as per @…

  • Loading branch information...
shawnmjones committed Jun 17, 2019
1 parent 705eec4 commit 204df59ad4be0afb8a6f30b9f73cc96641e04fe6
Showing with 14 additions and 0 deletions.
  1. +12 −0 bin/tellstory
  2. +2 −0 docker-compose.yml
@@ -305,6 +305,15 @@ def choose_mementoembed_api(mementoembed_api_candidates):

if type(mementoembed_api_candidates) == list:
statusii = []

env_mementoembed_api_candidate = os.getenv("MEMENTOEMBED_API_ENDPOINT")

if env_mementoembed_api_candidate is not None:
logger.info("adding {} from the environment to the list of candidate MementoEmbed API endpoints".format(env_mementoembed_api_candidate))
mementoembed_api_candidates.insert(
0, env_mementoembed_api_candidate
)

for url in mementoembed_api_candidates:
status = test_mementoembed_endpoint(url)
statusii.append(status)
@@ -319,6 +328,9 @@ def choose_mementoembed_api(mementoembed_api_candidates):
sys.exit(errno.EHOSTDOWN)

else:

logger.info("using MementoEmbed endpoing {}, specified via command line flag".format(mementoembed_api_candidates))

status = test_mementoembed_endpoint(mementoembed_api_candidates)

if status == False:
@@ -13,3 +13,5 @@ services:
volumes:
- .:/raintale-work
stdin_open: true
environment:
- MEMENTOEMBED_API_ENDPOINT=http://mementoembed:5550

0 comments on commit 204df59

Please sign in to comment.
You can’t perform that action at this time.