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
- ENV will be dev/stage or prod
- 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)
- ENV will be testing
- 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)
- ENV will be local_testing
- 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
- ENV will be prod
- 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)
- ENV will be prod
Suggestion
- have 2 env variables
- ENVIRONMENT:
- testing
- local
- dev
- stage
- prod
- ENVIRONMENT:
- There is a Vapor Environment variable with the options:
- testing
- development
- production