A Dockerized PHP + MariaDB web application for managing gym operations, including attendance tracking, course enrollment, user management, and trainer management.
- Create, update, and delete user profiles
- Manage trainers and assign them to courses
- Role-based access (admin, trainer, member)
- Create and schedule courses
- Member registration for classes
- Track available seats and course status
- Daily check-in tracking
- Attendance history for each member
- Exportable reports
- PHP application in a dedicated container
- MariaDB database container
- phpMyAdmin interface for database access
- Automatic initialization via
.envvariables
- PHP
- MariaDB
- phpMyAdmin
- Docker & Docker Compose
Create a .env file in the root directory.
Below is the development configuration, which enables an admin login with username admin and password admin.
DEV_MODE=true
# Admin credentials (development only!)
ADMIN_USERNAME=admin
ADMIN_HASH_PASSWORD='$2y$10$ePCfbB0tefjoqMwNDzVjROr0ehFvqO5FYG60KwrosI.qtz7rqendW'Do NOT use these credentials in production.
For production:
DEV_MODE=false
To generate a secure password hash:
php -r "echo password_hash('YourSecurePassword', PASSWORD_DEFAULT) . PHP_EOL;"Ensure you have:
- Docker
- Docker Compose
git clone https://github.com/pietropeerani/gym-manager.git
cd gym-managerdocker-compose up -dOnce the containers are running:
| Service | URL |
|---|---|
| Web App Preview | http://localhost:8080 |
| phpMyAdmin | http://localhost:8081 |
These ports can be customized in your docker-compose.yml.
docker-compose up -d --builddocker-compose logs -fPlace SQL scripts in:
/src/db/setup.sql
They will be executed automatically at first startup.
This project is licensed under the MIT License.