2014-12-24 11:01:50 +01:00
2025-09-20 17:35:58 -05:00
2012-08-22 18:15:37 +02:00
2012-08-22 18:15:37 +02:00
2014-07-11 12:04:51 +02:00
2025-02-13 14:54:39 -05:00
2025-02-10 10:39:21 -05:00
2025-02-10 15:21:16 -05:00
2025-09-20 17:35:58 -05:00
2015-09-23 17:14:53 +02:00
2015-01-21 18:23:47 +01:00
2020-02-29 11:43:00 -05:00
2025-11-23 10:05:12 -05:00
2013-01-10 01:00:59 +01:00
2025-09-20 17:35:58 -05:00
2015-02-10 15:44:46 +01:00
2020-03-04 19:52:28 -05:00
2012-08-30 11:12:23 +02:00
2025-09-20 17:35:58 -05:00
2012-09-03 15:19:13 +02:00
2014-10-17 16:39:37 +02:00
2020-02-29 11:43:00 -05:00
2020-03-12 10:54:58 -05:00
wip
2016-06-01 14:41:08 +02:00

Mozo server backend README

Start the server for development:

Start couchdb

Since in the Fedora Asahi on Macbook M1, couchdb is not an available package, it is build locally and started there:

cd ~/projects/couchdb/couchdb
./dev/run --admin=admin:admin

Did not work the last time. The docker version did.

Start rails

Note that the couchdb admin password can be changed for better security:

COUCHDB_ADMIN_PASSWORD=admin rails s

Access the server

The server should now be accessible using: https://localhost:3002/

TODO:

Supplier app

  • model validations
  • foundation css
  • entry funnel handling

User app

  • Supplier close as event that can be handled by users

Application architecture

Developing using SSL

When reading this, hopefully there will be a nice standardized solution, better than found at the time of writing this (2025-02-10) A nice solution seems to be using:

Also take a look at: https://jfbcodes.medium.com/using-rails-with-ssl-on-localhost-52d60f14a382

Building the product

  1. Set the current routes to mozo-supplier client code (TODO: make way better)
File.write "#{ENV["MOZO_PATH_SUPPLIER"]}/app/global-functionality/js-routes.js", JsRoutes.generate.sub(/this\);\n$/, 'window);')

Server side monit config

Could be in /etc/monit/monitrc:

# Monit configuration for Puma
# Service name: puma_mozo.bar_production
#
check process puma_mozo.bar_production
  with pidfile "/var/www/mozo.bar/shared/tmp/pids/puma.pid"
  group mozo
  start program = "/usr/bin/sudo -u root /bin/bash -c 'cd /var/www/mozo.bar/current && /usr/local/rvm/bin/rvm default do bundle exec puma -C /var/www/mozo.bar/shared/puma.rb --daemon'"
  stop program = "/usr/bin/sudo -u root /bin/bash -c 'cd /var/www/mozo.bar/current && /usr/local/rvm/bin/rvm default do bundle exec pumactl -S /var/www/mozo.bar/shared/tmp/pids/puma.state stop'"

check process DRBcounter with pidfile /var/www/mozo.bar/shared/tmp/pids/DRBcounter.pid
  group mozo
  start program = "/bin/bash --login -c '/var/www/mozo.bar/releases/20150123150713/bin/drb_counter.rb start -- production'"
  stop program = "/bin/bash --login -c '/var/www/mozo.bar/releases/20150123150713/bin/drb_counter.rb stop'"

check process faye with pidfile /var/www/mozo.bar/shared/tmp/pids/faye.pid
  group mozo
  start program = "/bin/bash --login -c 'thin start -d -R /var/www/mozo.bar/releases/20150123150713/faye/config.ru -p 9296 --pid /var/www/mozo.bar/shared/tmp/pids/faye.pid'"
  stop program = "/bin/bash -c 'kill -15 $(lsof -i:9296 -t); true'"
S
Description
No description provided
Readme 12 MiB
Languages
Ruby 52.7%
Sass 16.6%
Slim 13.8%
CoffeeScript 7.7%
Gherkin 3.9%
Other 5.2%