Sinar / BillWatcher-2.0

The new version of Malaysian Parliament BillWatcher
GNU General Public License v3.0
7 stars 1 forks source link

Setup Vagrant #6

Open sweemeng opened 9 years ago

sweemeng commented 9 years ago

Setup vagrant. Create an ansible provisioner, since I plan to use ansible in production. I suggest that we use this . https://github.com/jaugustin/vagrant-ansible-local. It is better that we don't assume all contributor will be a *nix box.

Will discuss again if ansible setup with that plugin don't work, might fallback to salt or puppet.

sweemeng commented 9 years ago
5 17 * * *  /opt/apps/billwatcher/bin/bill_download /opt/apps/billwatcher/config/production.ini
10 17 * * * /opt/apps/billwatcher/bin/bill_parse /opt/apps/billwatcher/config/production.ini
15 17 * * * /opt/apps/billwatcher/bin/bill_to_es /opt/apps/billwatcher/config/production.ini

cron script on test environment

sweemeng commented 9 years ago

supervisor config. Need to setup supervisor

[program:billwatcher]
autorestart=true
directory=/opt/apps/billwatcher
command = /opt/apps/billwatcher/bin/pserve /opt/apps/billwatcher/config/production.ini
user=billwatcher
process_name = billwatcher
priority = 10
redirect_stderr = false
stdout_logfile=/var/log/supervisor/billwatcher.log
sweemeng commented 9 years ago

nginx config used in test environment

server {
       listen   80;
       server_name      billwatcher.sinarproject.org;

       access_log       /var/log/nginx/billwatcher.access.log;
       error_log        /var/log/nginx/billwatcher.error.log;

       location / {
                root    /opt/apps/billwatcher/billwatcher/static/;
                if (!-f $request_filename) {
                   proxy_pass              http://127.0.0.1:9001;
                }
                include custom_proxy.conf;
       }

       # location /portia {
       #                proxy_set_header        X-Script-Name /static;
       #                proxy_pass               http://127.0.0.1:9999;
       #                include custom_proxy.conf;
       # }

       location /supervisor/ {
                proxy_pass  http://127.0.0.1:10001/;
                proxy_set_header        Host $host;
                proxy_buffering         off;
       }
}
sweemeng commented 9 years ago

Need to add setup for nginx/mongodb/supervisor

mongodb need to be from upstream

kiawin commented 8 years ago

Please assign to me. Terima Kasih!

kiawin commented 8 years ago

Applications to setup