You create external secrets on the command line -> check.
You declared the external secets in the docker-compose.yml to register them for use-> check.
You declared the registered secrets to your service in the docker-compose.yml to actualy use them -> check.
You declare environment variables to store the location of the secret -> are you aware of this?
Does your spring app use the environment variabels to actualy load the files and read their content?
Thank you @meyay for the response, I am able to cat the /run/secrets/AWS_S3_SECRET_KEY, and see the value, but I am unable to assign the value to the variable in the environment.
Do we need any extra processing to assign the secrets to environment variables?
Docker swarm services (a stack does start nothing else) do not allow to assign environment variables to an environment variable. Like my last question in my last response already indicates: you need to parse each secret (=each mounted file) individualy. You can either do this in your entrypoint script or in your application.