Skip to content

Hosting

Taylor Brent edited this page Dec 17, 2019 · 1 revision

Hosting

The repo is configured by app/firebase.json to use the app/build folder. This folder is updated whenever you run yarn build from within app. To deploy the static assets from the app/build folder, do the following:

  1. Make sure you have authenticated your gcloud account with firebase. To do this I had to run firebase login:ci which was weird. But after that, it gives you a token. You'll need to pass this token as a flag for all future firebase requests. You could also automate this if you wanted to.
  2. For a test deployment, run: firebase serve --token=<your-token> from within the app folder.
  3. To deploy to production, run: firebase deploy --token=<your-token>.

That's it!

(We already have Cloudflare DNS configured to a static IP that Firebase gives us)

Repo Structure

A note on repo structure: You can think of the top-level of the repo as being a truffle, and the app subfolder as a drizzle app. The truffle part just helps generate the artifacts for the app, and can also act as a local chain by running truffle develop. Other than that, though, it can be discarded. This is why we only need to host the static files from the build folder of the drizzle app.

Clone this wiki locally