An open API service indexing awesome lists of open source software.

https://github.com/samardzicnenad/flongo

A template application for the Python/Flask - MongoDB environment
https://github.com/samardzicnenad/flongo

docker-compose flask gunicorn jinja2 libsass mongo nginx python

Last synced: 5 months ago
JSON representation

A template application for the Python/Flask - MongoDB environment

Awesome Lists containing this project

README

          

# Flongo
## Description:
Flongo is a "template application" for the Python/Flask - MongoDB environment.
It also provides a simple user management system that serves the following API endpoints:
- / (it will redirect to /login or /index depending on the existence of the active user session)
- /signup
- /login
and
- /index

There is also an auxiliary endpoint:
- /info

which is not actually a part of the project, but exists in order to provide additional info to the application users.

Once a user signs up and logs in, the session cookie is created and it is valid for 30 minutes

## Usage:
Running


$ docker-compose up

command will pull images and build, create, start and link the container instances for the services defined in the docker-compose.yml file, resulting in flongo application running on:

http://0.0.0.0 (and/or http://0.0.0.0:80)

* docker-compose.yml defines three services that will get started and linked:
* flongo (python:2.7.12 with the following dependencies: flask, pymongo, libsass)
* nginx
* mongo (mongo:3.3.10)

## Data model specifics:
The application stores data in three collections:
- users
- usernames and email addresses are unique
- sessions
- the list of the most recent user sessions
- past_sessions
- the list of the past user sessions

## Additional elements:
The application uses:
- Gunicorn - application server
- Nginx - front end reverse proxy
- Jinja2 - templating engine and
- libsass - CSS preprocessor

## Notes:
- during the login and signup processes, non ascii characters will be ignored