(in order)
Local MongoDB (e.g. https://docs.mongodb.com/v3.2/administration/install-on-linux/) Ubuntu 16LTS this is
sudo apt-get install mongodb
Redis on Ubuntu 16LTS this is
sudo apt-get install redis-server.
Ruby Installation (advised to use with RVM)
RVM follow the installation instruction (e.g. for Ubuntu).
Install Ruby 2.3.8
rvm install ruby-2.3.8
Set up a gemset for a clear separation, e.g. named hyplag
rvm gemset create hyplag rvm gemset use 2.3.8@hyplag rvm gemset install sidekiq rvm gemset install bundler rvm gemset install puma rvm gemset install sass rvm gemset install yuidoc
Bundler Ubuntu 16LTS this is sudo gem install bundler.
Afterwards a mongodb and redis-server should be running in the background of your system (on Ubuntu it's an auto-start service, after the package installation).
For use with a clean database:
First duplicate .env-example file in the root directory and rename it to .env. Replace username and password with the credentials for the backend you received.
$ bundle install
$ rake db:reset
The application uses sidekiq for async jobs: http://localhost:3000/sidekiq. It should be started first.
$ sidekiq
Run Ruby on Rails start command:
$ rails s
All frontend assets are running with a separate server which must also run along side. See: frontend-assets
To work properly and import new documents the backend service should be available.
In the default environment configuration .env-example the URL to the latest backend
version is set PDS_API_URI=https://backend.hyplag.org. This service must be active prior.
This projects also includes several seeds filling the system with prepared documents. Documents and configuration files
are found in ./db. Seeds can be loaded via
rake db:seed:<name of seed file>
# Examples
rake db:seed:formula
rake db:seed:jcdl2019
config file: .env
in /~root
In a productive environment you must add a value for SECRET_KEY_BASE. This value is used to encrypt cookies. See
further infos in /config/secrets.yml.
config files: production.rb / development.local.rb
in /config/environments
To connect your instance of citeplag-dev-frontend
to a frontend asset server, change the value
config.action_controller.asset_host to localhost:3001 or whatever port you are running the frontend-assets on.
If want to connect to our "frontend asset" test server you can also use https://hyplag.org:8001.
A good way to change the config for a local development system is to create a development.local.rb file in the config environment folder.
On a server it is advised to prepare a rvm gemset for a running user
rvm gemset create hyplag
rvm gemset use 2.3.8@hyplag
rvm gemset install sidekiq
rvm gemset install bundler
rvm gemset install puma
rvm gemset install sass
rvm gemset install yuidoc
Content type
Image
Digest
Size
444.3 MB
Last updated
over 5 years ago
docker pull aggipp/hyplag-frontend