# Backstory web frontend ## Development ``` docker compose up frontend -d ``` The container bind mounts frontend/ into the container, and launches `npm start`. Once running, you can now access https://localhost:3000 to view the frontend. To monitor progress and build errors: ``` docker compose logs -f frontend ``` When you are happy with your changes and wish to deploy to production: 1. Commit your changes: ``` git commit ``` 2. Build the static deployed version: ``` docker compose exec frontend shell ./build.sh ``` 3. If successful, tag your version: ``` git tag -a "deployed-$(date +%y%m%d)" -m "Deployed on $(date)" ``` 4. Push your changes: ``` git push origin main --tags ``` ## Production Static production build is in `deployed`. You do not need to be running the frontend container once deployed to production. When you run the `build.sh` script, it first builds to `build`. If that succeeds, it then runs `rsync -avprl --delete build/ deployed/` to update the deployed static content.