I have the following docker-compose.yml file:
version: '3.6'
services:
stripe-cli:
image: stripe/stripe-cli:latest
container_name: stripe-cli
secrets:
- StripeSecretKey
environment:
StripeSecretKey: /run/secrets/StripeSecretKey
command: --api-key ${StripeSecretKey} listen --forward-to http://localhost:5000/api/payment/webhook
secrets:
StripeSecretKey:
file: ./secrets/StripeSecretKey.txt
The secret 'StripeSecretKey' points to a text file which has the secret key being:
I am trying to string interpolate my secret key value in the command argumant of the stripe-cli container. But I am unable to do so with the above syntax.
I am getting the following warning when executing the above docker-compose file:
WARNING: The StripeSecretKey variable is not set. Defaulting to a blank string.
I would appreciate the help.
