Kobwar / gcp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@template/starter-firebase-nextjs

Forked from @jthegedus/firebase-gcp-examples and adapted for personal taste.

Quickstart

To use this template, click "Use Template" at the top of the page. This will guide you through generating a new repository with this as a base. Next, head over to Firebase and create a new project to host your site. Take note of the project id. Finally, clone your newly generated repository and run these commands (as applicable) from the project root:

yarn setup                  # setup environment variables and CI/CD
yarn dev                    # start live dev server
yarn preview:staging        # staging preview
yarn preview:production     # production preview
yarn deploy:staging         # publish to staging Firebase project
yarn deploy:production      # publish to production Firebase project

Manual Environment Setup:

If you are unable to use the automated setup script, you can still manually create the following .env file to setup your project:

// .env
STATIC_PROD_PROJECT=...     // production Firebase project-id
STATIC_PROD_WEBAPP_KEY=...  // from firebase console
STATIC_STAGE_PROJECT=...    // (optional) staging Firebase project-id
STATIC_STAGE_WEBAPP_KEY=... // (optional) from firebase console
STATIC_DEPLOY_KEY=...       // from yarn firebase login:ci

For CI/CD with TravisCI, you will need to do the following:

  1. Authorize TravisCI and enable on repository (if applicable).
  2. Add environment variables in your repository settings on TravisCI for the each of the variables in your .env file.

Syncing upstream changes from this template

If you would like to keep your template instance up-to-date with this source repository, you can do the following to select and apply updates:

yarn update

This will allow you to apply all necessary, tested, non-breaking patches and changes.

About

License:MIT License


Languages

Language:JavaScript 57.3%Language:TypeScript 32.1%Language:Shell 8.5%Language:CSS 1.1%Language:HTML 1.0%