Read secret from docker secrets

This commit is contained in:
2025-11-01 11:09:59 +07:00
parent 04c48e67b8
commit bec4c0af97
9 changed files with 130 additions and 283 deletions

View File

@@ -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();
}
}