Giter Club home page Giter Club logo

Comments (9)

simonw avatar simonw commented on June 15, 2024

It looks like the now --name option can do this: https://zeit.co/docs/now-cli#commands/now/unique-options/name

BUT...

Now_CLI_Reference_-_ZEIT

I'm a bit confused by project linking: https://zeit.co/docs/now-cli#commands/now/project-linking

from datasette-publish-vercel.

styfle avatar styfle commented on June 15, 2024

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.

simonw avatar simonw commented on June 15, 2024

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.

simonw avatar simonw commented on June 15, 2024

https://datasette-fixtures.simonw.now.sh was deployed with:

datasette publish now2 ../datasette/fixtures.db --project datasette-fixtures

from datasette-publish-vercel.

simonw avatar simonw commented on June 15, 2024

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.

simonw avatar simonw commented on June 15, 2024

Posted vercel/vercel#4021 - Please reconsider deprecating "name" in now.json

from datasette-publish-vercel.

styfle avatar styfle commented on June 15, 2024

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.

simonw avatar simonw commented on June 15, 2024

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.

styfle avatar styfle commented on June 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.