Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Wisk API Running scenarios

  • Run K8s in Dev/Stage/Prod only the API
    • ENV will be dev/stage or prod
      • it will connect to the dev/stage or prod database
      • it will use the queue for each environment
  • Run for testing in the .github action
    • ENV will be testing
      • it will connect to the dev database (TODO: create a testing database in the .github action)
      • it will run queue operations synchronously or not run them at all (it’s the test that defines this)
  • Run the API test locally pointing to the local database (running on docker-compose)
    • ENV will be local_testing
      • it will connect to the local database
      • it will run queue operations synchronously or not run them at all (it’s the test that defines this)
  • Run the API locally but pointing to the production database running async
    • ENV will be prod
      • it will connect to the production database
      • it will run queue operations async in the production queue
  • Run the API locally but pointing to the production database running sync
    • ENV will be prod
      • it will connect to the production database
      • it will run queue operations sync in the local running API (bypassing the queue)

Suggestion

  • have 2 env variables
    • ENVIRONMENT:
      • testing
      • local
      • dev
      • stage
      • prod
  • There is a Vapor Environment variable with the options:
    • testing
    • development
    • production