Skip to content

Latest commit

 

History

History
92 lines (61 loc) · 3.96 KB

README.md

File metadata and controls

92 lines (61 loc) · 3.96 KB

project logo

WaiterRobot

Lightning fast and simple gastronomy

Setup

  1. Install Node (consider using node version manager to manage multiple node versions)
  2. Install Docker
  3. Install pnpm
  4. Run pnpm install
  5. Login to the GitHub container registry (see here)

Local dev

To pull the docker containers you first have to login to the GitHub container registry. For instructions see here.

Using ng server

docker compose -f compose-local-dev.yml up & pnpm start && echo "Press Ctrl+C again to stop the containers" && fg

Open http://localhost:4200/. To stop press Ctrl + C twice (first time to stop ng serve and second to stop the containers).

Using nginx container

docker compose -f compose-local-dev.yml -f compose-local.yml up --build

Open http://localhost:4200/. To Stop press Ctrl + C.

Using nginx container with auto rebuild on changes

docker compose -f compose-local-dev.yml -f compose-local.yml watch

Open http://localhost:4200/. To Stop press Ctrl + C.

Browser will not reload automatically, you need to refresh manually after rebuild is completed.

Using the lava backend

This will connect to the lava backend hosted on lava.kellner.team.

ng serve -c lava

Open http://localhost:4300/.

Release new version

Lava

Run bash tools/releaseLava.sh

This will create and push a new lava version tag using version specified in package.json. The -lava-{timestamp} suffix will be automatically appended.
The CI will then build the new docker container image and push it to the GitHub registry.

Prod

  1. Run bash tools/release.sh

    This will create and push a new prod version tag using the version specified in package.json.
    The CI will then build the new docker container image and push it to the GitHub registry.

  2. Increase the version in the package.json file.
  3. Commit and push package.json.

Deploy

For deployment instructions see WaiterRobot-Infrastructure.

Container version schema

Tags with _local suffix are build for api hosted on localhost
Tags with _lava suffix are build for api hosted on lava.kellner.team
Tags with neither _lava nor _local suffix are build for api hosted on my.kellner.team

Tags containing -lava are pre/beta/lava releases. Those are not available for my.kellner.team.

Samples:

  • 3.4.0, latest -> prod release for my.kellner.team
  • 3.4.0_lava, latest_lava -> prod release for lava.kellner.team
  • 3.4.0_local, latest_local -> prod release for localhost
  • 3.4.0-lava-20240118135000_lava, 3.4.0-lava_lava, latest-lava_lava -> pre/beta/lava release for lava.kellner.team
  • 3.4.0-lava-20240118135000_local, 3.4.0-lava_local, latest-lava_local -> pre/beta/lava release for localhost