This project uses environment variables for configuration and runs on Docker for easy setup. Follow the steps below to get started.
You can just change email information on .env file.
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
[email protected]
EMAIL_HOST_PASSWORD=your_password
-
Build and Run Docker Containers:
docker-compose up --build -d
-
Migration:
docker-compose run web python manage.py makemigrations docker-compose run web python manage.py migrate
-
Create Admin User
docker-compose run web python manage.py createsuperuser
- Manager login page: http://localhost:8000/manager/login
- Employee login page: http://localhost:8000/login
You can use the seed_data.sql file to add example data to the database. Password is 'cmpass12' for all users.
docker cp seed_data.sql company_management-db-1:/opt/seed_data.sql
docker exec -it company_management-db-1 psql -U postgres -d company_management_db -f /opt/seed_data.sql