posty / posty_api

Utility to administrate mailserver based on postfix and dovecot
www.posty-soft.org
Other
85 stars 19 forks source link

Docs #6

Closed fescon closed 10 years ago

fescon commented 10 years ago

Due to the fact, that there are no docs up to now - for me as a ruby newbie it's quite hard to understand where to place the posty_api on my system - I'm tryin to get posty_webui to run - problem for me is how to link posty_api to posty_webui. I'm on ubuntu 12.04 and running ruby 1.9.3

Thx in adavance

Felix

chicobico commented 10 years ago

The posty_api should run on the mailserver. In the configuration of the webui you must specify the URL and the Port on which the posty_api is accessable. Please use the webui branch beta-v.1.0.1 which has nearly all new features from the posty_api integrated. Ruby 1.9.3 is correct and should work with the actual posty_api version. Any other specific problems?

fescon commented 10 years ago

Ok next - I've got a postfix/dovecot installation running basing on the workaround.org tutorial, now it tries create a table which still exists or do I have to run posty on a seperat DB? Don't think so - how can I change the migration scripts so they only update the missing fields and views?

chicobico commented 10 years ago

Create a blank Database and follow the instructions in the readme. In the database.yml file add your database name, username, password in the production section. Now run "RACK_ENV=production rake db:migrate" or set the environment variable RACK_ENV to production and run "rake db:migrate" and all tables will be created automatically for you.

  1. Download the source either using git or from the GitHub page as archive.
  2. Extract the archive
  3. Change directory to the extracted folder
  4. Move config/database_default.yml to config/database.yml and change it to your needs.
  5. Run bundle install
  6. Run rake db:migrate
  7. Run rake api_key:generate
  8. Start the application e.g. with rackup
fescon commented 10 years ago

Do I run apache for the api service with mod-passenger or with mod_ruby?

chicobico commented 10 years ago

You can use apache with passenger. If you want to try it first go to the project folder and run "RACK_ENV=production rackup" With this command the server is started in foreground and you can see the output. You can also daemonize rackup with the option -D Or you can use e.g. puma, thin,...

fescon commented 10 years ago

And hopefully the last question: What do I have to put in conf.js as URL to connect to rakeup?

lweis commented 10 years ago

Hey fescon,

var serverUrl = 'http://example.com/api/v1'; // here your can set your posty_API URL var serverAuthKey = 'API KEY'; // here you can set your posty_API Key

fescon commented 10 years ago

got it :) THX a lot for your support!!!!

retmarut commented 10 years ago

The README.md mentions under Installation to run: $ bundle install When I try that on a debian wheezy installation I get the following: ruby: No such file or directory -- bundle (LoadError) I guess there are essential parts missing in my ruby setup. (ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux])