This document provides instructions for setting up the PinguCrew backend for local development and Docker-based deployment.
Ensure the following tools are installed on your system:
- Python 3.8+
- pip
- Docker and Docker Compose
- Git
Follow these steps to set up the backend for local development:
-
Create a Virtual Environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Set Up Configuration
- Update the configuration files in the
config/directory as needed. - Example: Update
config/system/config.yamlwith your desiredSECRET_KEY.
- Update the configuration files in the
-
Run Bootstrap Script
Use the provided bootstrap script to initialize the database, message queues, and other components:
bash src/bootstrap/bootstrap.sh
-
Start the Development Server
python manage.py runserver
Follow these steps to deploy the backend using Docker:
-
Build and Start Docker Containers
docker-compose up --build
-
Verify Services
- Access the backend at
http://localhost:8086. - Verify other services (e.g., RabbitMQ, Minio) using their respective ports.
- Access the backend at
- Update sensitive credentials in the configuration files (
config/) before deployment. - For production, ensure to use secure values for environment variables like
SECRET_KEY,POSTGRES_PASSWORD, andMINIO_ROOT_PASSWORD.