File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,14 @@ app_dir=/app
14
14
build_root=/tmp/build
15
15
cache_root=/tmp/cache
16
16
cache_file=/tmp/cache.tgz
17
- env_root=/tmp/env
17
+ secret_dir=/tmp/env
18
+ env_root=/tmp/environment
18
19
buildpack_root=/tmp/buildpacks
19
20
20
21
mkdir -p $app_dir
21
22
mkdir -p $cache_root
22
23
mkdir -p $env_root
24
+ mkdir -p $secret_dir
23
25
mkdir -p $buildpack_root
24
26
mkdir -p $build_root /.profile.d
25
27
@@ -97,13 +99,19 @@ REQUEST_ID=$(openssl rand -base64 32)
97
99
export REQUEST_ID
98
100
export STACK=cedar-14
99
101
102
+ # # copy the environment dir excluding the ephemeral ..data/ dir and other symlinks created by Kubernetes.
103
+
104
+ if [ " $( ls -A $secret_dir ) " ]; then
105
+ cp $secret_dir /* $env_root /
106
+ fi
107
+
100
108
# # SSH key configuration
101
109
102
- if [[ -n " $SSH_KEY " ]]; then
110
+ if [[ -f " $env_root / SSH_KEY" ]]; then
103
111
mkdir -p ~ /.ssh/
104
112
chmod 700 ~ /.ssh/
105
113
106
- echo " $ SSH_KEY" | base64 -d > ~ /.ssh/id_rsa
114
+ base64 -d " $env_root / SSH_KEY" > ~ /.ssh/id_rsa
107
115
chmod 400 ~ /.ssh/id_rsa
108
116
109
117
echo ' StrictHostKeyChecking=no' > ~ /.ssh/config
You can’t perform that action at this time.
0 commit comments