eisbuk / EisBuk

Manage bookings for ice skating lessons
GNU Affero General Public License v3.0
0 stars 1 forks source link

Update running of dev environment with production data #865

Open ikusteu opened 10 months ago

ikusteu commented 10 months ago

In #857 I've made it possible to run dev build of client app with production data for eisbuk or igorice by running rushx start:eisbuk / rushx start:igorice respectively, but I would like to make some updates so that the DX is as frictionless as possible.

  1. The script should be updated to add test@eisbuk.it to admins: I see that production has been changed so that test@eisbuk.it no longer an admin (which makes sense for production), so when we run the app locally with production data, it would make sense to add test@eisbuk.it to organization's admins field (we do it manually otherwise)

  2. The rushx start:<organization> flow should look something like this (using igorice as example):

    • start the emulators
    • run rushx start:igorice
    • the script should check if we already have the backed up data from igorice:
    • if there's no data locally, it should pull data from the production db
    • if local data already exists it should fill the emulators with the data
    • if local data is stale (we want the latest data) we should be able to manually update the local backup (see point 3)
  3. Rush repo commands should be updated so that backup and seeding (to emulators) of production data are two separate scripts (there should also be a different ticket to polish those commands)

Tasks: