-
Notifications
You must be signed in to change notification settings - Fork 1
/
generate_envrc.py
30 lines (25 loc) · 6.35 KB
/
generate_envrc.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import subprocess
from typing import TextIO
def add_var(name: str, value: str, f: TextIO):
f.write(f"export {name}={value}\n")
with open(".envrc", "w") as f:
f.write("source_up\n")
add_var("GRAPHQL_ADMIN_SECRET", "secret", f)
add_var("USER_ID", "john_doe", f)
add_var("TOKEN_AES_KEY", "05F0OX9SZY9EGK6T7196IBDKEC5CHX7D", f)
add_var("CLIENT_ID", "flask_social", f)
add_var("GRAPHQL_URI", "http://burger-joint-graphql:8080/v1/graphql", f)
add_var("BURGER_RESOURCES_BASE_URL", "http://burger.local:3000", f)
add_var("SOCIAL_CLIENT_BASE_URL", "http://social.local:5000", f)
add_var("BURGER_AUTH_JWT_SECRET", "secret", f)
add_var(
"BURGER_AUTH_JWT_PUB_KEY",
"LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQ0lqQU5CZ2txaGtpRzl3MEJBUUVGQUFPQ0FnOEFNSUlDQ2dLQ0FnRUF0d1pjT3R4WTFTbUI4aFlUUDA1RQoxZy9PaUFGT0V4N25HYnZVaVZnOS9ONGt4UDJNQ0JGajB4bUR2cGIwQTB3MUhQTEpzcjlHVkhtR0REcEhnbzQxCmdrMS9yQ25qYVRFdFhQWTVnZVdDS1Z0bFE0Yms0ZWdNNU8yNjZUK3NzYW5QbzZQQklNdVF2SDFYNVJ3cGZvZlkKbkkrUHBubnd2cHJEVkdNdlFqNzNMaW9wZ1RVc1VxVjg5bUluK0c2QTQzVHlFYi9PZ0ZySmxZY2dPZDVtekR3NQpPSUJseVduemhVZmVMUXR0YXBQdkw1NzBMV3ZkcUp0aDEyM2NhWWlCWUhTandVc0NLTXJVSnhvUGRhSlFvT1NSCnEvTnVHTitWTisxUXFPNVd2bDRhd09NNi9EQlFYZ1pweU5GMm94b2ZZM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