Comments (3)
Current implementation bakes the secrets into the Dockerfile:
datasette-publish-fly/datasette_publish_fly/__init__.py
Lines 85 to 96 in a265963
Here's info on Fly secrets: https://fly.io/docs/reference/secrets/
Short version:
flyctl secrets set MY_SECRET=value -a name-of-app
You can set multiple secrets in a single call.
from datasette-publish-fly.
Problem: we can persist the environment variable secrets in between deployments, but we don't have a mechanism for persisting the metadata.json
we have constructed, which needs to include this bit:
{
"plugins": {
"datasette-auth-passwords": {
"root_password_hash": {
"$env": "ROOT_PASSWORD_HASH"
}
}
}
}
from datasette-publish-fly.
Once again I find myself wanting a reliable way to introspect the deployed application.
I discussed some options in #12 (comment)
- Hit the
/-/databases.json
JSON API - problem here is that it might be protected by authentication or not yet available if the app hasn't been fully deployed- Stash a Fly secret with a list of database names, then read that again next time I deploy. This doesn't work because secret values aren't available to
flyctl secrets list
- you only get back the digest.- Stashing the list of databases in a tag or annotation - but it turns out Fly doesn't provide application or volume tags or annotations
Another option might be the fly ssh
command - https://fly.io/docs/flyctl/ssh/ - but that's more designed for issuing SSH credentials and doesn't seem to have a neat equivalent of heroku run ...
that could be easily scripted to run a command inside the application.
Two options then:
- Tell the user they have to call
--plugin-secret
on subsequent deploys - Only allow deploys if the application itself can be reached via HTTP, and introspect it that way
I'm going to go with option 1 since it's simpler.
from datasette-publish-fly.
Related Issues (20)
- Support Fly volumes HOT 12
- Research how to deploy with latest flyctl and with a volume HOT 22
- `--generate-dir` option HOT 4
- Add output of `datasette publish fly --help` to the README HOT 1
- Also test against Python 3.10
- `*.db` database being created HOT 9
- `--generate-dir` works confusingly HOT 3
- Large sqlite db, 10min threshold guess HOT 1
- Return code not non-zero on errors HOT 2
- Deployment fails with "incompatible types: TOML value has type string; destination has type integer"
- Error org slug must be specified when not running interactively HOT 1
- Support configuration directory mode HOT 1
- Allow loading SQLite extensions
- Don't break if upgrade message shown
- TypeError: __init__() got an unexpected keyword argument 'capture_output' HOT 2
- Take advantage of new --json option
- fly() got an unexpected keyword argument 'secret' HOT 1
- Tool now asks interactive questions, it did not before HOT 12
- "Can't close tar writer: io: read/write on closed pipe" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datasette-publish-fly.