Add running and contributing instructions

This commit is contained in:
2023-04-11 18:37:34 +02:00
parent 81d2d92924
commit d8c37d7a86
3 changed files with 88 additions and 3 deletions

View File

@@ -6,6 +6,13 @@ Quantified self
* System dependencies: none
## Installation
git clone https://gitea.michalczyk.pro/fixin.me/fixin.me.git
bundle config set --local path '.gem'
bundle install
## Configuration
cp -a config/application.rb.dist config/application.rb
@@ -15,7 +22,7 @@ Modify configuration settings below `SETUP` comment appropriately.
## Database
Create database user and grant privileges:
Grant database user and privileges:
> mysql -p
mysql> create user fixinme@localhost identified by '<some password>';
@@ -33,7 +40,41 @@ Run database creation and migration tasks:
## Running
Apache configuration for: Puma+mod_proxy, mod_passenger ...
### Standalone Rails server + Apache proxy
Copy Puma config template:
cp -a config/puma.rb.dist config/puma.rb
and specify server IP/port, either with `port` or `bind`, e.g.:
bind 'tcp://0.0.0.0:3000'
Run server
RAILS_ENV="production" bin/rails s
## How to run the test suite: ...
### Apache mod_passenger
## Contributing
### Database
Grant database user privileges for development and test environments,
possibly with different Ruby versions:
> mysql -p
mysql> create user `fixinme-dev`@localhost identified by '<some password>';
mysql> grant all privileges on `fixinme-%`.* to `fixinme-dev`@localhost;
mysql> flush privileges;
### Environment
Use `RAILS_ENV="development"` for rake commands and running rails server.
Use `RAILS_ENV="test"` for running tests.