Firebase Setup
Create an account on Firebase:
- Click "Get Started"
- Click "Add Project", and set a name. Click "Continue"
- Decline Google Analytics, and click "Continue"
- Click "Authentication", then "Get Started"
- Click "Google" under Additional Providers; click the toggle to enable,
then select an email address, and click "Save"
- Click the gear icon next to Project Overview, and select "Project
Settings"
- Click the "Service Accounts" tab, then click "Create Service Account"
- Select "Go" then click "Generate new private key"
- Save the resulting JSON file
- Click the "General" tab, then click the
</>
icon to set up a new web
app integration
- Choose a name, then click "Register App". Copy the
const firebaseConfig
that it generates for you
Environment Variables
export FIREBASE_CONFIG=... # the contents of the JSON file from step 9, as a single line
# these values come from the const firebaseConfig object you generated in step 11
export FIREBASE_API_KEY=...
export FIREBASE_AUTH_DOMAIN=...
export FIREBASE_DATABASE_URL=...
export FIREBASE_PROJECT_ID=...
export FIREBASE_STORAGE_BUCKET=...
export FIREBASE_MESSAGING_SENDER_ID=...
Use direnv to make this convenient so that you don't
have to re-export these values into your environment each time you work on
Gencon Planner
Dev Env Setup
- Install Docker Desktop
- Start the database in the background:
$ docker compose up -d db
- Start the web server in the forgreound
$ docker build --target web .
$ docker compose up web
The web container depends upon the update
container, which will download &
parse the events spreadsheet from gencon.com in the background.
To reset all state, use docker compose down -v
to clear the DB data
volume, then follow the above steps again
Bootstrap local db from genconplanner.com
Instructions adapted from https://devcenter.heroku.com/articles/heroku-postgres-import-export
heroku pg:backups:capture --app genconplanner
heroku pg:backups:download --app genconplanner
docker exec -i genconplanner-db-1 pg_restore --verbose --clean --no-acl --no-owner -U postgres -d genconplanner < latest.dump
Alternate Dev Env
This setup uses a local postgres database and the heroku
command. It may
be more like the true run-time environment than the Docker version above.
To run server locally with Heroku, use ./build.sh && heroku local web
To update the event listing locally, use ./build.sh && heroku local update