- pia (front-end) application and/or pia (stand-alone) application
- Ruby 2.3.x
- Rails 5.0.x
- PostgreSQL 9.4+
You can follow this runbook for a full installation of pia (back-end) and pia (front-end) applications on a ubuntu 17.10 server.
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.
git clone https://github.com/atnos/pia-back.git
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.
cp config/application.example.yml config/application.yml
Generate the SECRET_KEY_BASE with: rake secret
and paste the secret key in the file.
bundle install
bin/rake db:create
bin/rake db:migrate
-
bin/rails s
your server will be accessible with the URLlocalhost: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 URL123.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"
- Fill the
production
section in thedatabase.yml
file. - Create the database:
RAILS_ENV=production bin/rake db:create
- Create the tables:
RAILS_ENV=production bin/rake db:migrate
- Run the server:
RAILS_ENV=production bin/rails s
bin/rake
Contributor : ylachgar
provided the runbook to install pia front-end & back-end applications.