-
Notifications
You must be signed in to change notification settings - Fork 12
Defang compose up showing Error: missing configs:"API_KEY" #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We do show a hint when the compose up fails due to an issue with secrets |
After |
@acote88 This is the log when I first run the command. $ defang generate
* Connecting to fabric-prod1.defang.dev:443
? Please describe the service you'd like to build: Hello World
? What folder would you like to create the service in? service1
* Working on it. This may take 1 or 2 minutes...
* Writing files to disk...
- docker-compose.yml
- Dockerfile
- package.json
- main.js
* Code generated successfully in folder service1
Check the files in your favorite editor.
To deploy the service, `cd service1` and do:
defang compose up
A newer version of the CLI is available at https://github.com/defang-io/defang/releases/latest
* $ defang compose up
* Connecting to fabric-prod1.defang.dev:443
WARNING ingress port without healthcheck defaults to GET / HTTP/1.1
WARNING missing memory reservation; specify deploy.resources.reservations.memory to avoid out-of-memory errors
* Compressing build context for service1 at /Users/yuta519/work/service1
* Uploading build context for service1
* Deploying service service1
Error: failed_precondition: missing secret source:"API_KEY"
To manage service secrets, use:
defang secret On the version: '3.9'
services:
service1:
build:
context: .
dockerfile: Dockerfile
ports:
- mode: ingress
target: 3000
secrets:
- API_KEY
secrets:
API_KEY:
external: true When I changed the directory , this yml was different like the below. version: '3.9'
services:
service1:
build:
context: .
dockerfile: Dockerfile
ports:
- mode: ingress
target: 3000
#secrets:
#API_KEY:
#external: true Also, I tried to set a secret, however, I'm not sure yet. $ defang secret ls
* Connecting to fabric-prod1.defang.dev:443
{}
A newer version of the CLI is available at https://github.com/defang-io/defang/releases/latest
$ defang secret set
* Connecting to fabric-prod1.defang.dev:443
Error: required flag(s) "name" not set
$ defang secret set API_KEY
Error: unknown command "API_KEY" for "defang secret set"
To manage service secrets, use:
defang secret |
Need better DX after generating/instantiating a project that requires config. CLI shows |
"I don't know is whether that's a Defang api key, an AWS api key, or something else. Why do I need an API key? I'm just following your tutorial. Shouldn't I have been prompted to set one up?"
The text was updated successfully, but these errors were encountered: