Get Up and Running Fast
This guide will get you from zero to a fully functional Bookify API in just a few minutes using Docker Compose.Prerequisites: You only need Docker and Docker Compose installed. Everything else runs in containers.
Quick Start Steps
Start the Application
Use Docker Compose to start all services (API, PostgreSQL, Redis, Keycloak, Seq):This command will:
- Build the Bookify API Docker image
- Start PostgreSQL database on port 4001
- Start Redis cache on port 6379
- Start Keycloak identity provider on port 18080
- Start Seq logging server on ports 5341 and 8081
- Start the Bookify API on port 5001 (HTTPS)
The first run will take a few minutes to download images and build the application. Subsequent starts will be much faster.
Verify Services are Running
Check that all containers are running:You should see all services with status “Up”:
bookify.apiBookify.Db(PostgreSQL)Bookify.Identity(Keycloak)Bookify.Seq(Logging)Bookify.Redis(Cache)
Check API Health
Verify the API is healthy by checking the health endpoint:You should see a JSON response indicating all health checks passed:
Use
-k flag with curl to bypass SSL certificate validation for local development.Explore the API with Swagger
Open your browser and navigate to the Swagger UI:You’ll see the interactive API documentation where you can explore and test all available endpoints.
Access the Services
Once everything is running, you can access:| Service | URL | Credentials |
|---|---|---|
| Bookify API | https://localhost:5001 | N/A |
| Swagger UI | https://localhost:5001/swagger | N/A |
| Keycloak Admin | http://localhost:18080 | admin / admin |
| Seq Logs | http://localhost:8081 | N/A |
| PostgreSQL | localhost:4001 | postgres / postgres |
| Redis | localhost:6379 | No password |
Understanding the Docker Setup
The application uses two Docker Compose files:Next Steps: Make a Booking
Now that your API is running, try creating a booking:Get an Authentication Token
First, you’ll need to authenticate with Keycloak. Use the token endpoint:Save the
access_token from the response.Stopping the Application
When you’re done, stop all services:Troubleshooting
Port already in use
Port already in use
If you see errors about ports being in use, you can either:
- Stop the conflicting service
- Modify the port mappings in
docker-compose.override.yml
Database connection failed
Database connection failed
Wait a few seconds for PostgreSQL to fully start. The API has automatic retry logic but may need a moment on first startup.
Migrations not applied
Migrations not applied
In Development mode, migrations are automatically applied on startup. Check the logs:
View detailed logs
View detailed logs
What’s Next?
Now that you have Bookify running:- Explore the API Reference to see all available endpoints
- Learn about the Architecture to understand the codebase structure
- Check out the Installation Guide for local development without Docker
- Read about Authentication to understand the Keycloak integration