To containerize CleanBites, follow these steps.
Run the following command to build the Docker image:
docker-compose build
Run the application in a container:
docker-compose up -d
✅ This starts the backend API, which will be available at http://localhost:8000
.
To stop the running container:
docker-compose down
✅ This shuts down the application while preserving any persistent data.
Change Type | Command |
---|---|
Code changes only (Python, HTML, JS, CSS) | docker-compose down && docker-compose up -d |
Dependency updates (requirements.txt ) |
docker-compose down && docker-compose build && docker-compose up -d |
Dockerfile or docker-compose.yml changes |
docker-compose down && docker-compose up --build -d |
Check logs | docker-compose logs -f |
Access running container | docker-compose exec api bash |
-
Ensure that your PostgreSQL instance (or AWS RDS database) is running and correctly configured.
-
The API is automatically exposed on port 8000 inside the container.
-
If you encounter issues, check logs using:
docker-compose logs -f
Enjoy using CleanBites! 🚀🎉