fix: correct issues with python3 no longer being available by default
This commit is contained in:
21
tests/apps/python/app-cnb.json
Normal file
21
tests/apps/python/app-cnb.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"healthchecks": {
|
||||
"web": [
|
||||
{
|
||||
"attempts": 2,
|
||||
"content": "python/http.server",
|
||||
"name": "check-1",
|
||||
"path": "/",
|
||||
"timeout": 5,
|
||||
"type": "startup",
|
||||
"wait": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"scripts": {
|
||||
"dokku": {
|
||||
"postdeploy": "touch /workspace/postdeploy.test",
|
||||
"predeploy": "touch /workspace/predeploy.test"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,8 @@ uri = "./cnb/1"
|
||||
[[build.buildpacks]]
|
||||
uri = "./cnb/1"
|
||||
|
||||
[[build.buildpacks]]
|
||||
uri = "gcr.io/paketo-buildpacks/python"
|
||||
|
||||
[[order.group]]
|
||||
uri = "gcr.io/paketo-buildpacks/procfile"
|
||||
|
||||
@@ -5,7 +5,8 @@ import os
|
||||
def main():
|
||||
print("GLOBAL_SECRET: {0}".format(os.getenv('GLOBAL_SECRET')))
|
||||
print("SECRET_KEY: {0}".format(os.getenv('SECRET_KEY')))
|
||||
with open("/app/.env", "r") as f:
|
||||
app_dir = os.getcwd()
|
||||
with open(f"{app_dir}/.env", "r") as f:
|
||||
for line in f.readlines():
|
||||
if "DOTENV_KEY" in line:
|
||||
print(line)
|
||||
|
||||
Reference in New Issue
Block a user