Skip to content

Commit

Permalink
Don't rely on Manifold for selecting keys.
Browse files Browse the repository at this point in the history
The .env file is the most up to date place, use that as reference.
  • Loading branch information
jelmersnoeck committed Feb 9, 2018
1 parent 3778fda commit b70b483
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.env.local:
manifold export | grep = | sort | sed -e 's|\([a-zA-Z_]*\)=\(.*\)|REACT_APP_\1=NGINX_REPLACE_\1|' > .env.local
cat .env | grep = | sort | sed -e 's|REACT_APP_\([a-zA-Z_]*\)=\(.*\)|REACT_APP_\1=NGINX_REPLACE_\1|' > .env.local

build/index.html: .env.local
yarn build

NGINX_SUB_FILTER?=$(shell manifold export | grep '=' | sort | sed -e 's/\(.*\)=\(.*\)/sub_filter\ \"NGINX_REPLACE_\1\" \"$$\{\1\}\";/')
NGINX_SUB_FILTER?=$(shell cat .env | grep '=' | sort | sed -e 's/REACT_APP_\([a-zA-Z_]*\)=\(.*\)/sub_filter\ \"NGINX_REPLACE_\1\" \"$$\{\1\}\";/')

nginx.conf:
cat nginx.conf.sample | sed -e 's|LOCATION_SUB_FILTER|\${NGINX_SUB_FILTER}|' | sed 's|}";\ |}";\n\t\t|g' > nginx.conf
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ services:
- 3001:3001
environment:
- PORT=${PORT:-3001}
- STRIPE_KEY=pk-docker-compose-supersecret
- SEGMENT_KEY=segment-docker-compose-secret
- STRIPE_KEY=${STRIPE_KEY:-pk-docker-compose-supersecret}
- SEGMENT_KEY=${SEGMENT_KEY:-segment-docker-compose-secret}

0 comments on commit b70b483

Please sign in to comment.