-
Clone the repository:
git clone https://github.com/storlay/booking.git cd booking -
Set up environment variables:
Create a
.envfile in the project's root directory. You will need to populate it with the required configuration values (e.g., database credentials, secret keys). -
Build and run the application:
docker compose -f infra/docker-compose.local.yml up --build -d
-
Access the application:
The API will be running and available at
http://127.0.0.1:8000.
The API documentation is automatically generated and can be accessed at the following endpoints:
- Swagger UI:
http://127.0.0.1:8000/docs - ReDoc:
http://127.0.0.1:8000/redoc
The project includes a separate Docker Compose configuration for running the test suite in an isolated environment.
-
Create a test environment file:
Create a
.env-testfile in the root directory with the configuration for the test database and other services. -
Run the tests:
docker compose -f infra/docker-compose.local.yml -f infra/docker-compose.local-test.yml up --build --abort-on-container-exit
This command will spin up the necessary services, run the tests, and then automatically shut everything down.