From e268ae68e71b892b0e7ba5fd568edbbd1cb32a51 Mon Sep 17 00:00:00 2001 From: Soam Vasani Date: Wed, 18 Jan 2017 15:43:29 -0800 Subject: [PATCH] Create python env conditionally --- examples/python/guestbook/deploy.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/python/guestbook/deploy.sh b/examples/python/guestbook/deploy.sh index 812bd153..815c0115 100755 --- a/examples/python/guestbook/deploy.sh +++ b/examples/python/guestbook/deploy.sh @@ -10,6 +10,9 @@ then exit 1 fi -fission env create --name python --image fission/python-env +# Create python env if it doesn't exist +fission env get --name python || fission env create --name python --image fission/python-env + +# Register functions and routes with fission fission function create --name guestbook-get --env python --code get.py --url /guestbook --method GET fission function create --name guestbook-add --env python --code add.py --url /guestbook --method POST