Read secret from docker secrets
This commit is contained in:
@@ -1,4 +1,45 @@
|
||||
{
|
||||
"schemaVersion": 2,
|
||||
"dockerfilePath": "./src/Managing.Web3Proxy/Dockerfile-web3proxy"
|
||||
}
|
||||
"dockerfilePath": "./src/Managing.Web3Proxy/Dockerfile-web3proxy",
|
||||
"preDeployFunction": function(captainAppObj, dockerUpdateObject) {
|
||||
// Define the array of all three secrets to be mounted in the container
|
||||
// File.Name must match the filename that code reads from /run/secrets/
|
||||
dockerUpdateObject.TaskTemplate.ContainerSpec.Secrets = [
|
||||
{
|
||||
// Secret 1: PRIVY_APP_ID
|
||||
File: {
|
||||
Name: "PRIVY_APP_ID", // Filename in the container at /run/secrets/PRIVY_APP_ID
|
||||
UID: '0',
|
||||
GID: '0',
|
||||
Mode: 292
|
||||
},
|
||||
SecretID: "4kk2gw2945x8hdatyhuhomtk2", // <<-- REPLACE THIS with the actual Secret ID from 'docker secret ls'
|
||||
SecretName: "privy_app_id"
|
||||
},
|
||||
{
|
||||
// Secret 2: PRIVY_APP_SECRET
|
||||
File: {
|
||||
Name: "PRIVY_APP_SECRET", // Filename in the container at /run/secrets/PRIVY_APP_SECRET
|
||||
UID: '0',
|
||||
GID: '0',
|
||||
Mode: 292
|
||||
},
|
||||
SecretID: "y81woaa2388zidk35gul7y9n6", // <<-- REPLACE THIS with the actual Secret ID from 'docker secret ls'
|
||||
SecretName: "privy_app_secret"
|
||||
},
|
||||
{
|
||||
// Secret 3: PRIVY_AUTHORIZATION_KEY
|
||||
File: {
|
||||
Name: "PRIVY_AUTHORIZATION_KEY", // Filename in the container at /run/secrets/PRIVY_AUTHORIZATION_KEY
|
||||
UID: '0',
|
||||
GID: '0',
|
||||
Mode: 292
|
||||
},
|
||||
SecretID: "spnc1vle5q560jsoy72ng0vtc", // <<-- REPLACE THIS with the actual Secret ID from 'docker secret ls'
|
||||
SecretName: "privy_auth_key"
|
||||
}
|
||||
];
|
||||
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user