diff --git a/.env b/.env index db4c14f..7dfa419 100644 --- a/.env +++ b/.env @@ -1,2 +1,2 @@ -REACT_APP_STRIPE_KEY=pk-supersecret -REACT_APP_SEGMENT_KEY=segment-super-secret +REACT_APP_STRIPE_KEY=${STRIPE_KEY} +REACT_APP_SEGMENT_KEY=${SEGMENT_KEY} diff --git a/.manifold.yml b/.manifold.yml new file mode 100644 index 0000000..f4e9dde --- /dev/null +++ b/.manifold.yml @@ -0,0 +1,2 @@ +team: siphoc +project: demo-app diff --git a/Makefile b/Makefile index a068c64..7697ff9 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ .env.local: - cat .env | grep = | sort | sed -e 's|\([a-zA-Z_]*\)=\(.*\)|\1=NGINX_REPLACE_\1|' > .env.local + manifold export | grep = | sort | sed -e 's|\([a-zA-Z_]*\)=\(.*\)|REACT_APP_\1=NGINX_REPLACE_\1|' > .env.local build/index.html: .env.local yarn build -NGINX_SUB_FILTER?=$(shell cat .env | grep '=' | sort | sed -e 's/\(.*\)=\(.*\)/sub_filter\ \"NGINX_REPLACE_\1\" \"$$\{\1\}\";/') +NGINX_SUB_FILTER?=$(shell manifold export | grep '=' | sort | sed -e 's/\(.*\)=\(.*\)/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 diff --git a/docker-compose.yaml b/docker-compose.yaml index 6251404..ebcbb5d 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -7,5 +7,5 @@ services: - 3001:3001 environment: - PORT=${PORT:-3001} - - REACT_APP_STRIPE_KEY=pk-docker-compose-supersecret - - REACT_APP_SEGMENT_KEY=segment-docker-compose-secret + - STRIPE_KEY=pk-docker-compose-supersecret + - SEGMENT_KEY=segment-docker-compose-secret