Permalink
Browse files

improve installation and fixes for going live

  • Loading branch information...
1 parent c169d1b commit c8ec8e7019a21efd82575e0dcdd7e1f3eac8ffbf Luke Closs committed Jul 18, 2012
Showing with 22 additions and 9 deletions.
  1. +3 −1 bin/install
  2. +15 −3 etc/nginx/biopay.conf
  3. +2 −2 etc/service/biopay/run
  4. +1 −2 lib/Biopay/Util.pm
  5. +1 −1 views/layouts/sidebar.tt
View
@@ -4,6 +4,7 @@ export INSTALL_DIR=/var/www/biopay
# Copy files into place
sudo cp etc/nginx/biopay.conf /etc/nginx/sites-available
+sudo cp etc/nginx/vancouverbiodiesel.* /etc/nginx/
sudo cp -R etc/service/biopay /etc/service
cp -R bin lib views environments etc app.psgi public $INSTALL_DIR
@@ -12,4 +13,5 @@ cp -R bin lib views environments etc app.psgi public $INSTALL_DIR
# Restart services
sudo /etc/init.d/nginx restart
-sudo svc -h /etc/service/biopay
+sudo svc -d /etc/service/biopay
+sudo svc -u /etc/service/biopay
View
@@ -1,10 +1,22 @@
-upstream dev {
+upstream webapp {
server 127.0.0.1:6000;
}
server {
listen 80;
- server_name billing-test.vancouverbiodiesel.org;
+ server_name vancouverbiodiesel.org;
+
+ # All traffic goes to https
+ location / {
+ rewrite ^(.*) https://vancouverbiodiesel.org$1;
+ }
+}
+
+server {
+ listen 443 default ssl;
+ server_name vancouverbiodiesel.org;
+ ssl_certificate vancouverbiodiesel.org.crt;
+ ssl_certificate_key vancouverbiodiesel.org.key;
access_log /var/log/nginx/biopay-access.log;
error_log /var/log/nginx/biopay-error.log;
@@ -14,6 +26,6 @@ server {
location / {
proxy_redirect off;
proxy_set_header Host $host;
- proxy_pass http://dev;
+ proxy_pass http://webapp;
}
}
@@ -10,6 +10,6 @@ export PERL5LIB="$BIO/lib"
cd $BIO
exec 2>&1 \
- /home/biopay/perl5/perlbrew/perls/perl-5.16.0/bin/starman --listen 127.0.0.1:6000 --workers 2 --preload-app \
+ /home/biopay/perl5/perlbrew/perls/perl-5.16.0/bin/plackup -s Starman -E production --listen 127.0.0.1:6000 --workers 2 --preload-app \
--user biopay --group www-data \
- $BIO/app.psgi >> /var/log/biopay-web.log 2>&1
+ -a $BIO/app.psgi >> /var/log/biopay-web.log 2>&1
View
@@ -71,8 +71,7 @@ sub now_dt {
sub host {
return 'http://' . request->host
if request && request->host =~ m/localhost/;
- # Otherwise use the bona fide dotcloud SSL cert
- return 'https://ssl-biopay.dotcloud.com';
+ return 'https://vancouverbiodiesel.org';
}
sub beanstream_url {
@@ -48,7 +48,7 @@
<li><a href="/biopay.pdf">Biopay Info Sheet</a></li>
<li><a href="http://twitter.com/vanbiodiesel" class="twitter-follow-button"
data-show-count="false">Follow @vanbiodiesel</a>
- <script src="http://platform.twitter.com/widgets.js" type="text/javascript">
+ <script src="https://platform.twitter.com/widgets.js" type="text/javascript">
</script></li>
</dl>
<p><a href="/login" class="large primary btn">Member Login</a></p>

0 comments on commit c8ec8e7

Please sign in to comment.