The Free Architecture for Remote Education
This is the main codebase for FARE. FARE is an e-learning web platform. The main aim of FARE is to provide repository features: easy search and download functionalities. Furthermore, for registered users it is possible to upload new contents, modify some existing ones or delete.
- Quick search
- Download simple Learning Object
- User login and permission management
- Content upload
To search the desired material you just have to type what you are looking for in the search bar
Everyone can upload content but it is necessary to be logged in. After the upload your content will be reviewed and, if everything is ok, it will be published.
If you are a staff member, you can review the material and let it be visible by everyone!
This project runs Invenio v3.4.0.
To be able to develop and run out instance you will need the following installed and configured on your system:
- Docker v1.18+ and Docker Compose v1.23+
- NodeJS v6.x+ and NPM v4.x+
- Enough virtual memory for Elasticsearch (when running in Docker), if running Linux/MacOS you'll have to bump your
vm.max_map_count
as described in Elasticsearch docs - Cookiecutter
- Pipenv
Important note: Before run the application you need to:
-
Set the environment variables in a
.env
file, it must be created. You can see an example in the.env.example
file provided. -
Create the directories used as shared volumes to store the data used by the application executing the command:
$ pipenv run ./scripts/create-volumes
You can use a full-stack production environment using the docker-compose.fare.yml
setup, it allows you to run all components in containers. To bring it up you have to execute the following commands:
# Build the application images first
$ ./docker/build-images.sh
$ docker-compose -f docker-compose.fare.yml up -d
Remember to create database tables, search indexes and message queues if it has not already been done:
$ docker-compose -f docker-compose.fare.yml run --rm web-ui ./scripts/setup
First, fire up the database, Elasticsearch, Redis and RabbitMQ:
$ cd my-site/
$ docker-compose -f docker-compose.dev.yml up -d
Creating mysite_cache_1 ... done
Creating mysite_db_1 ... done
Creating mysite_es_1 ... done
Creating mysite_mq_1 ... done
Next, activate the virtualenv of the new project by running:
$ pipenv shell
Finally, install all dependencies, build the JS/CSS assets, create the database tables and create the Elasticsearch indices by running the bootstrap and setup scripts:
(my-site)$ ./scripts/bootstrap
(my-site)$ ./scripts/setup
You can now start the development web server and the background worker for your new instance:
(my-site)$ ./scripts/server
* Environment: development
* Debug mode: on
* Running on https://127.0.0.1:5000/ (Press CTRL+C to quit)
Further documentation, related to the framework used and the topics not covered in this guide, can be found here.
If you found a bug please report it here opening an issue. Searching help?
Here the semantic versioning we use
Code actually maintained by Open Education Polito. For inquiries, please open an issue and tag @libremente.
The decisions regarding the architecture are recorded in the ADR folder. Please visit ADR to know more about the previous decisions.
Logging is done by invenio_logging module. The log messages are:
current_app.logger.debug('Where am I?')
current_app.logger.info('Hello world!')
current_app.logger.warning('Be carefull with overlogging.')
current_app.logger.error('Connection could not be initialized.')
current_app.logger.exception('You should not divide by zero!')
The file where to write the log messages can be specified setting the variable LOGGING_FS_LOGFILE
This version works only with python 3.6.x
The CVS provides detailed info regarding who did what.
This code is licensed under a MIT License, v3. See the LICENSE.md file for extended info, and the license files inside each module's repository.