- create a project, add an app.
- add hosting, add custom domain(you can add custom domain later).
- add storage. Config rule as following
rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /{allPaths=**} {
allow write: if request.auth != null && request.resource.size < 5 * 1024 * 1024;
allow read;
}
}
}
- add auth, for anomynous sign in. it allows anonymous user upload files to firebase, and only allow them upload through this website
- select the project created in Firebase
- go to storage, select the bucket.
- give read permission to all users.
- get template
git clone git@github.com:SFPL-IT/claim-review-website-template.git claim-review-website-[subdomain]
- create a github repo for this project named as
claim-review-website-[subdomain]
- change remote url of your local repo from
template
to your newly created github repo. eggit remote set-url origin [new github url]
- change
.env-example
to.env
. - add environment variable
REACT_APP_remoteHost
for remote host. eg. https://[subdomain].sellerprogitpro.com. - Add all firebase related environment variables to
.env
file where to get Project Overview Gear -> project settings -> General -> your app -> Firebase SDK snippet -> config - install firebase tools
npm install -g firebase-tools
- init firebase
firebase init
, note that project root isbuild
directory - build project
npm run build
- deploy
firebase deploy