SIGS-UnB / core

Project SIGS
MIT License
1 stars 7 forks source link

SIGS - Sistema Inteligente de Gestão de Salas

SIGS-image

Build Status Maintainability Test Coverage Ruby Rails MIT License

SIGS is a Ruby on Rails website project design for UnB (University of Brasília). The project aims to facilitate and automate the process of allocation of university rooms by city officials, coordinators and other stakeholders. For more informations see the The Wiki Project (wrote in brazilian portuguese).

Further information about how to contribute and information about the project community, you may also want to read our Contributing document and our Code of Conduct, we strongly recommend.

Features

To see the features of the project Click Here.

License

To see the license of the project Click Here

Getting Started

The SIGS project uses Docker to isolate both the staging and production environment, the staging environment is also used to test new features and corrections. With Docker Compose both environments cited can be easily run with a few commands in your terminal (you should install and set up Docker and Docker Compose on your machine, see steps below). You may also run SIGS via rails serve, for this, you should enter the SIGS folder and run it as a normal rails web app, but we strongly recommend to not do so, if you still want to run this way, do it at your own risk.

Set up using Docker

Running Tests

Cucumber

docker exec sigs bundle exec rake cucumber

RSpec

bundle exec rspec

Rubocop

bundle exec rubocop

Set up Production

1) Change environment variables on production.env file

2) If you want to get auto letsencrypt certificates uncomment nginx config.

#server {
#    listen 80;
#    server_name $SIGS_DOMAIN;

#    location / {
#        return 301 https://$host$request_uri;
#    }

#    location /.well-known/acme-challenge/ {
#        root /var/www/certbot;
#    }
#}

server {
    #listen 443 ssl;

    #ssl_certificate /etc/letsencrypt/live/$SIGS_DOMAIN/fullchain.pem;
    #ssl_certificate_key /etc/letsencrypt/live/$SIGS_DOMAIN/privkey.pem;
    #include /etc/letsencrypt/options-ssl-nginx.conf;
    #ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}

3) Point DNS record to your External IP 4) Change your domain and email on docker/prod/init-letencrypt.sh

domains=(example.com)
email="example@email.com" # Adding a valid address is strongly recommended

5) Run sudo ./docker/prod/init-letencrypt.sh 6) Run docker-compose -f docker-compose-prod.yml up --build 7) Open your favorite browser and navigate to your domain

Using the application

Deploy

Deploy SIGS is an easy task, all you have to do is follow these steps:

Further configuration may be needed (nginx configurations, domain purchase and configurations, machine configurations and so on), but you're free to customize and run SIGS at your own way, remember, this is an open source project!

The project maintainers' deploy is running on a digitalocean droplet that's also easy to do and keep! You can access it from this link.