Run with Docker¶
You can start the app easily with Docker Compose.
Before startup, remember to run API in advance and make sure you have all the configurations set up as mentioned before.
Development¶
Uvicorn (1 worker)
docker compose up -d # run services in the background
docker compose run --rm console # run application console
docker compose down # shut down all the services
After startup, you can visit http://localhost:3000 to see the application's page.
Production¶
Gunicorn + Uvicorn (4 workers)
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d # run services in the background
docker compose -f docker-compose.yml -f docker-compose.prod.yml run --rm console # run application console
docker compose -f docker-compose.yml -f docker-compose.prod.yml down # shut down all the servicesvolumes
After startup, you can visit http://localhost:3000 to see the application's page.
BDD Testing¶
Before testing, remember to run API under test environment in advance.
For users of Intel or AMD64 devices, you can run BDD testing as follows:
docker compose -f docker-compose.test.yml run --rm spec
If you're testing on ARM64 devices (e.g. Apple M1), use the following command instead:
docker compose -f docker-compose.test.yml run --rm spec-arm