Create and manage Confidential Virtual Machines (CVMs) on Phala Cloud.
.env
files. You should first define the encrypted secrets in
the Phala Cloud UI (or CLI), and then reference them in the docker compose file using the ${KEY}
syntax.
A typical use case is pass secrets to your containers via environment variables, using the
environment:
docker compose directive.
Important: Do not use double quotation marks around variables:
❌OPENAI_API_KEY="${OPENAI_API_KEY_IN_ENV}"
Encrypted Secrets configuration interface
${KEY}
syntax.Besides the environment variables, you can also reference the encrypted secrets in any other place
like the command:
docker compose directive. However, you should be careful to not leak the secret
values in the logs or other places.Learn more about Docker .env files here.