The platform for conducting, tracking and checking students' sports activity at Innopolis University.
- Install Python 3.12, Poetry, Docker
- Install project dependencies with Poetry.
cd adminpage poetry install
- Copy environment variables:
cp deploy/.env.example deploy/.env
(leave default values in development) - Start services:
docker compose -f ./deploy/docker-compose.yaml up --build
- Make migrations and create superuser:
- Enter shell:
docker compose -f ./deploy/docker-compose.yaml exec -it adminpanel bash
- Autocreate migration files:
python3 manage.py makemigrations
- Apply migrations to db:
python3 manage.py migrate
If there are problems with migrations applying, try to run the same migrate command with
--fake
option. - Create a new superuser:
python3 manage.py createsuperuser
- Enter shell:
- View admin panel at
http://localhost/admin
Note
Server supports auto-reload on code change in debug mode
API documentation:
- Swagger is at http://localhost/api/swagger
- Redoc is at http://localhost/api/redoc
.
├── adminpage - Django project
│ ├── adminpage - main django app
│ │ ├── settings.py
│ │ ├── swagger.py
│ │ ├── urls.py
│ │ └── wsgi.py
│ ├── api
│ │ ├── crud - directory with database queries
│ │ ├── fixtures - database tools for testing
│ │ ├── serializers - DRF serializers
│ │ ├── tests
│ │ │ ├── api - endpoints tests
│ │ │ └── crud - database queries tests
│ │ └── views - api endpoints
│ ├── sport
│ │ ├── admin - django adminpage classes
│ │ ├── dumps - database dumps for tests
│ │ ├── migrations - django database migrations
│ │ ├── models - django database models
│ │ ├── signals - django ORM signal handlers
│ │ ├── static - static files for app (css, fonts, images, js)
│ │ │ └── sport
│ │ │ ├── css
│ │ │ ├── fonts
│ │ │ ├── images
│ │ │ └── js
│ │ ├── templates - django templates for app pages
│ │ └── views - app pages url handlers
├── deploy - deployment configuration
│ ├── docker-compose.yaml - development Docker Compose file
│ ├── docker-compose.prod.yaml - production Docker Compose file
│ ├── docker-compose.test.yaml - services for automatic testing
│ ├── .env.example - example of environment variables
│ ├── nginx-conf - reverse proxy configuration
│ ├── nginx-logs - request logs
│ ├── grafana-provisioning - default dashboards for Grafana
│ └── prometheus - Prometheus configs
├── scripts - development tools
└── README.md
- Merge your changes to 'main' branch.
- Verify that a new version works on the staging server.
- Create a new tag with the version number in the format
vF24.22.20
, where F24 is the semester number and 22.20 is the release number. You can create the tag via GitHub releases tab. - Ask maintainer (@ArtemSBulgakov) to allow the deployment via GitHub Actions.
- Verify that changes work on the production server.