|Arthur POULET 5a24cdb6b7||11 months ago|
|config||1 year ago|
|documentation||1 year ago|
|init||11 months ago|
|public||11 months ago|
|scripts||1 year ago|
|src||11 months ago|
|test||11 months ago|
|.drone.yml||11 months ago|
|.env.sample||1 year ago|
|.gitignore||1 year ago|
|Gemfile||11 months ago|
|Gemfile.lock||1 year ago|
|README.md||11 months ago|
|Rakefile||11 months ago|
|config.ru||1 year ago|
Install the software on a server
Install the dependencies
You should have the following systems installed:
ruby 3 AND gems
sqlite OR postgresql
Git is required to clone the project and fetch the tags in order to expose them in the
Then make sure you have installed bundler
gem install bundler if not already done.
Then install the ruby dependencies.
A sample file contains all the variables you will need in order to start the server.
This is the
.env.sample file. You should copy it under the name
- LIFEPEX_DB: is an url to your database. It may include a user/password
- LIFEPEX_BIND: what your socket will listen to (should probably be 127.0.0.1 or 0.0.0.0)
- LIFEPEX_BASE_URL: base url for the whole app (for local usage you can leave if empty)
- LIFEPEX_SECRET: you must put randomness in this variable to secure tokens and cookies
- LIFEPEX_ENV: may be empty, test, or production to avoid showing the stacktrace when there is a bug
The recommanded way is simply to init the database you configured with
If you have postgresql, you may want to create a specific user/password for this. Since I suck with SGDB administration, this is a sample of what you may do.
TODO: show how to create a simple attribute with full permission on this database
psql -U postgres postgres -c "CREATE USER root WITH PASSWORD 'toor' SUPERUSER;" psql -U postgres postgres -c "CREATE DATABASE life_pex" echo LIFEPEX_DB=postgres://root:toor@localhost/life_pex >> .env.local rake db:migrate
- configuration: check
- setup dependencies: check
- setup database: check
You can simply start the application.
Service, update, etc.
You may want to take a look at the
scripts/ directory which contains tons of config helper, for nginx, systemd, etc.
./init/doc.rb xdg-open ./public/doc/index.html
Generate first a specific configuration file
cp .env.local .env.test.local editor .env.test.local # don't forget to set a new database !!!
Then init the database
LIFEPEX_ENV=test rake db:migrate
Then if you want to run the test, simply type
rake test (you will need the startup env variable to be set first).