Comments (9)
It looks like the now --name
option can do this: https://zeit.co/docs/now-cli#commands/now/unique-options/name
BUT...
I'm a bit confused by project linking: https://zeit.co/docs/now-cli#commands/now/project-linking
from datasette-publish-vercel.
Ideally, the user would create a new repository for their project and then import the repo so that deployments are created via git push.
Then there is no need to install or learn the CLI.
See https://vercel.com/docs/git for more info.
from datasette-publish-vercel.
My use-case here is a bit different from that - the idea with Datasette is to support people creating one-off deployments for specific databases, so asking them to set up a GitHub account for each one doesn't work (I want my users to be able to work without understanding or thinking about GitHub at all).
I don't want to tell my users "in order to publish your database you need to first create a new repository for it on GitHub" - that doesn't fit the ad-hoc data publishing workflow I'm trying to encourage.
I'm going to use the "name"
property of now.json
for the moment, and cross my fingers that it doesn't get deprecated and removed! https://zeit.co/docs/configuration#project/name
from datasette-publish-vercel.
https://datasette-fixtures.simonw.now.sh was deployed with:
datasette publish now2 ../datasette/fixtures.db --project datasette-fixtures
from datasette-publish-vercel.
What happens if you use a project name that someone else is using already? Like https://hugo-hello-friend.now.sh/
$ datasette publish now2 ../datasette/fixtures.db --project hugo-hello-f
> UPDATE AVAILABLE The latest version of Now CLI is 17.1.1
> Read more about how to update here: https://zeit.co/update-cli
> Changelog: https://github.com/zeit/now-cli/releases/tag/17.1.1
> Deploying /private/var/folders/bl/5x847xbj2yb7xmp7f2tz7l280000gn/T/tmpvpvoizap/datasette-now-v2 under simonw
> Using project hugo-hello-friend
> Synced 1 file (261B) [377ms]
> https://hugo-hello-friend-r1ntou5dr.now.sh [v2] [785ms]
┌ index.py Ready [14s]
└── λ index.py (7.3MB) [sfo1]
> Ready! Aliases assigned [16s]
- https://hugo-hello-friend-tau.now.sh
- https://hugo-hello-friend.simonw.now.sh [in clipboard]
That seems reasonable to me.
from datasette-publish-vercel.
Posted vercel/vercel#4021 - Please reconsider deprecating "name" in now.json
from datasette-publish-vercel.
What happens if you use a project name that someone else is using already?
I think there is some confusion. Project names don't equal domain names. You'll get a projectname.username.now.sh domain automatically but you can add additional domains, either .now.sh suffix or any custom domain. Visit the Domains tab on your project.
I don't want to tell my users "in order to publish your database you need to first create a new repository for it on GitHub" - that doesn't fit the ad-hoc data publishing workflow I'm trying to encourage.
I see, then you can ignore my GitHub comment above.
That being said, consider a user deploys once, then makes a change to their code, and deploys again. Typically they would want to promote one of these deployments to production and assign the production domain, probably the latest. How do you account for assigning production domains? (the git integration handles this when you merge to master, deploys from a PR are considered preview).
from datasette-publish-vercel.
Right now I'm running --prod
automatically on every deploy with the tool, which I believe means that their latest deployment will always be promoted to "live" for the given --project
they provide.
If the user doesn't want to go live straight away they can use the --no-prod
option:
datasette publish my.db --project my-project --no-prod
Does that makes sense? I'm not 100% confident I understand the details of how --prod
is meant to be used.
from datasette-publish-vercel.
Yes that makes sense. It sounds like the datasette default is the opposite for Now CLI.
I think the word "live" here might be the source of confusion though because every deployment is "live" with ZEIT Now. The only distinguishable difference today is --prod
will assign production domains.
However, in the near future, there will be another difference. The --prod
flag will also apply different environment variables because users will be able to assign different variables to different environments.
from datasette-publish-vercel.
Related Issues (20)
- `--scope teamname` option HOT 2
- `datasette publish vercel` having issues with exporting JSON HOT 18
- Datasette 0.59 broke this plugin
- Site no longer deploys HOT 1
- Ability to specify a custom vercel.json HOT 2
- Use the new File System API HOT 1
- Query page .csv and .json links are not correctly URL-encoded on Vercel under unknown specific conditions HOT 8
- Ensure ds.invoke_startup() runs on startup HOT 1
- `--crossdb` option for publishing with `crossdb=True`
- Error! unknown or unexpected option: --no-clipboard HOT 4
- RuntimeError('There is no current event loop in thread %r.') HOT 10
- Use Vercel's Build Output API
- WARN! `--confirm` is deprecated, please use `--yes` instead HOT 4
- --setting allow_download 0 causes a 500 error HOT 3
- Bug cannot read properties of undefined HOT 7
- Error: No such command 'vercel'. HOT 1
- Unable to deploy using Vercel CLI 32.5.6 HOT 1
- FileNotFoundError + PermissionError when publishing to Vercel using default command
- Error while parsing repo data: ENOENT: no such file or directory, open $tmpdir/datasette-now-v2/.git/config HOT 2
- Failed to run "pip3.9 install --disable-pip-version-check --target . werkzeug==1.0.1" | Error: spawn pip3.9 ENOENT HOT 5
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-vercel.