Skip to content
/ EcoIT Public

This project is an online course platform. The objective is to allow developers to train in eco-responsible development.

Notifications You must be signed in to change notification settings

konradcr/EcoIT

Repository files navigation

EcoIT


HTML5 CSS3 Bootstrap PHP Symfony MariaDB Heroku App Status License: MIT

Logo

About the project


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.

Getting Started


Local Deployment

  1. Clone the repository
git clone https://github.com/konradcr/EcoIT
  1. Navigate to the repository
cd EcoIT
  1. Install dependencies
composer install

Create the database

  1. 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"
  1. 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
  1. 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

Launch the server

symfony server:start

Heroku Deployment

Make sure that you have installed Heroku CLI and that you committed the project on git.

  1. Connect your Heroku account
heroko login
  1. Create the Heroku project
heroko create
  1. Then create the Procfile :
echo 'web: heroku-php-apache2 public/' > Procfile
  1. URL Rewrites
composer require symfony/apache-pack

Environment variables

  1. Set APP_ENV to prod :
heroku config:set APP_ENV=prod
  1. Change the APP_SECRET in production :
heroku config:set APP_SECRET=$(php -r 'echo bin2hex(random_bytes(16));')

Heroku Add-ons - Database with JawsDB

  1. Add the JawsDB Maria Add-ons from Heroku to take advantage of a real database :
heroku addons:create jawsdb-maria:kitefin
  1. Copy your database url from :
heroku config:get JAWSDB_MARIA_URL
  1. Set your new DATABASE_URL :
heroku config:set DATABASE_URL=your_db_url
  1. 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

Deploy to Heroku

git add .
git commit -m "Heroku configuration"
git push heroku main
heroku open

Learn more


Symfony
Bootstrap
Heroku
JawDB Maria

License


Released under MIT by @konradcr.

About

This project is an online course platform. The objective is to allow developers to train in eco-responsible development.

Topics

Resources

Stars

Watchers

Forks