Giter Club home page Giter Club logo

pia-back's Introduction

Getting started

Requirements

Installation

You can follow this runbook for a full installation of pia (back-end) and pia (front-end) applications on a ubuntu 17.10 server.

PostgreSQL installation

Basic installation on Debian you can use the following documentation: wiki.debian.org/PostgreSql on Ubuntu you can use: help.ubuntu.com/community/PostgreSQL

Also, you need to create a new user with password.

Clone the repository

git clone https://github.com/atnos/pia-back.git

Create and fill the file database.yml

cp config/database.example.yml config/database.yml

Fill the fields username and password with the PostgreSQL username and password created in the previous step.

Create and fill the file application.yml

cp config/application.example.yml config/application.yml

Generate the SECRET_KEY_BASE with: rake secret and paste the secret key in the file.

Install all dependencies

bundle install

Create database

bin/rake db:create

Create tables

bin/rake db:migrate

Run the application

  • bin/rails s your server will be accessible with the URL localhost:3000

  • You can specify the option -b to bind to a public IP address or domain name and -p to use a différent port.

    For example: bin/rails s -b 123.456.789.101 -p 8080 your server will be accessible with the URL 123.456.789.101:8080

  • Then, in the pia (front-end) application, use this URL to enable the server mode.

  • Fill the field in "Tools" > "Settings"

PIA Settings

Run the application in production mode

  1. Fill the production section in the database.ymlfile.
  2. Create the database: RAILS_ENV=production bin/rake db:create
  3. Create the tables: RAILS_ENV=production bin/rake db:migrate
  4. Run the server: RAILS_ENV=production bin/rails s

Run the test

bin/rake

Acknowledgments

Contributor : ylachgar

provided the runbook to install pia front-end & back-end applications.

pia-back's People

Contributors

brunto avatar kevin-atnos avatar labocnil avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.