Setting Up User Service
Prerequisites:
- Docker with Docker Compose
- Clone or download the repository from: Muimi Chat User Service Repository
Environment Variables
- In the repository, locate the
.env.example
file. - Review the comments and make the necessary modifications.
- Save the file as
.env
once you have finished editing.
Key Points:
- Generate a
DJANGO_SECRET_KEY
using the following command:Terminal window python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())' - On slower PCs, the startup time for Redis/PostgreSQL database might be longer. Adjust the
STARTUP_DELAY
variable accordingly based on your hardware specifications. - For development purposes, it’s generally safe to keep all variables, except
DJANGO_SECRET_KEY
, as their default values. However, for production, it’s essential to change the default username and password.
Running the Project
To run the project, simply execute the following command:
docker-compose up
Your server will be running at the port number you specified.
By following these steps, you’ll be able to set up the User Service Django API for Muimi Chat.