This project is an online course platform. The objective is to allow developers to train in eco-responsible development. Teachers can create an account in order to offer courses. Students can create an account to take these courses.
Project carried out as part of an evaluation.
- Clone the repository
git clone https://github.com/konradcr/EcoIT
- Navigate to the repository
cd EcoIT
- Install dependencies
composer install
- Into the .env file modify the database url with your database :
DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7"
- Then, create the database and do the migrations :
php bin/console doctrine:database:create
php bin/console make:migration
php bin/console doctrine:migrations:migrate
- Restore the backup of the database located in the annexes folder :
mysql -h DB_HOST -u DB_USER -pDB_PASSWORD DB_NAME < EcoIT/annexes/backup_eco_it.sql
symfony server:start
Make sure that you have installed Heroku CLI and that you committed the project on git.
- Connect your Heroku account
heroko login
- Create the Heroku project
heroko create
- Then create the Procfile :
echo 'web: heroku-php-apache2 public/' > Procfile
- URL Rewrites
composer require symfony/apache-pack
- Set APP_ENV to prod :
heroku config:set APP_ENV=prod
- Change the APP_SECRET in production :
heroku config:set APP_SECRET=$(php -r 'echo bin2hex(random_bytes(16));')
- Add the JawsDB Maria Add-ons from Heroku to take advantage of a real database :
heroku addons:create jawsdb-maria:kitefin
- Copy your database url from :
heroku config:get JAWSDB_MARIA_URL
- Set your new DATABASE_URL :
heroku config:set DATABASE_URL=your_db_url
- Migrating the backup of the database located in the annexes folder to JawsDB :
mysql -h JAWS_DB_HOST -u JAWS_DB_USER -pJAWS_DB_PASSWORD JAWS_DB_DATABASE < EcoIT/annexes/backup_eco_it.sql
git add .
git commit -m "Heroku configuration"
git push heroku main
heroku open
Symfony
Bootstrap
Heroku
JawDB Maria