Skip to content

InnoSport platform at Innopolis University. Students check in for sport classes, instructors manage the schedule and collect attendance.

License

Notifications You must be signed in to change notification settings

one-zero-eight/sport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

InnoSport website

Tests Production deploy

The platform for conducting, tracking and checking students' sports activity at Innopolis University.

Development

Set up for development

  1. Install Python 3.12, Poetry, Docker
  2. Install project dependencies with Poetry.
    cd adminpage
    poetry install
  3. Copy environment variables: cp deploy/.env.example deploy/.env (leave default values in development)
  4. Start services: docker compose -f ./deploy/docker-compose.yaml up --build
  5. 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
  6. View admin panel at http://localhost/admin

Note

Server supports auto-reload on code change in debug mode

API documentation:

Project structure

.
├── 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

Flows

Releasing a new version

  1. Merge your changes to 'main' branch.
  2. Verify that a new version works on the staging server.
  3. 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.
  4. Ask maintainer (@ArtemSBulgakov) to allow the deployment via GitHub Actions.
  5. Verify that changes work on the production server.

About

InnoSport platform at Innopolis University. Students check in for sport classes, instructors manage the schedule and collect attendance.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published