question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`firebase deploy` without firebase.json

See original GitHub issue

We have a project that generates four different artifact-websites, each of these has to be deployed to a different Firebase project. We could generate a separate firebase.json file for each but I don’t think it makes much sense. firebase.json is used to generate an archive that’s pushed to Firebase. Why not let us provide everything that’s configurable in JSON file via parameters to firebase deploy? This approach plays really well with CI and fully automated deployments of multiple projects at once.

Here’s an example - this firebase deploy call is equivalent to having a JSON file.

firebase deploy \
  --firebase project-name \
  --public ./build
  --ignore firebase.json \
  --ignore '**/.*'
  --ignore '**/node_modules/**'
  --token abcd
{
  "firebase": "project-name",
  "public": "./build",
  "ignore": [
    "firebase.json",
    "**/.*",
    "**/node_modules/**"
  ]
}

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:9
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
eirikbcommented, Dec 9, 2016

For my own personal sake I only need --public, and nothing else. - I only want to get rid of a file I actually don’t need.

However, if I had to specify a lot of configuration, but for different environments, I would prefer specifying the name of a configuration file, .e.g, --config firebase-dev.json.
Or perhaps --config dev, and dev is a property under {"firebase": { "dev": { ... } } in package.json.

5reactions
mbleighcommented, Dec 8, 2016

It’s going to be extremely difficult to enumerate the entire array of possible config as command-line options. I’d be more amenable to being able to pass the config JSON inline:

firebase deploy --config '{"hosting":{"public":"dist"}}'

WDYT?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure Hosting behavior | Firebase Hosting - Google
json file define which files in your project directory should be deployed to your Firebase project.
Read more >
Firebase deploy firebase.json only - Stack Overflow
I'm currently doing firebase deploy --only hosting but that will deploy all the assets. I'm asking because I want to test out my...
Read more >
Deploy Firebase Functions using GitHub Actions - Dave Sugden
Create a Google Service Account and download a key file (json format) — save this key as a Secret in your GitHub repository....
Read more >
Deploying to Firebase | Cloud Build Documentation
In your repository, add a build config file with steps to invoke the firebase deploy command where project-id is your Cloud project ID:...
Read more >
Deploying to Firebase Hosting
Using Firebase Hosting, we can deploy our application's static files (HTML, CSS, JavaScript, etc) to the web ... This will generate a firebase.json...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found