Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
245 views
in Technique[技术] by (71.8m points)

Faunadb dev: fixed secret key

I’m using the dev container and I need to have a fixed secret key. Here’s my current script to create the container and the db.

#!/usr/bin/env bash

docker pull fauna/faunadb
docker container stop faunadb || true && docker container rm faunadb || true
docker run --name faunadb -d 
        --health-cmd="faunadb-admin status" --health-interval=5s 
        -p 8443:8443 
        -p 8084:8084 
        fauna/faunadb
./docker/wait-for-healthy.sh faunadb 30

echo n | fauna add-endpoint http://localhost:8443/ --alias localhost --key secret
fauna create-database generator_dev --endpoint=localhost
fauna create-key generator_dev --endpoint=localhost

curl -u secret: http://localhost:8084/import --data-binary "@functions/schemas/schema.graphql"

I would like this command to always return the same secret key

fauna create-key generator_dev --endpoint=localhost

Is that possible? I need a fixed secret key because I need to import the schema in the next step, so the easy way is to have a known secret key

Any idea is appreciated

question from:https://stackoverflow.com/questions/65852076/faunadb-dev-fixed-secret-key

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...