Changeset 424abb3 in rattail-fabdemo


Ignore:
Timestamp:
11/15/15 23:02:06 (4 years ago)
Author:
Lance Edgar <ledgar@…>
Branches:
master
Children:
4d94122
Parents:
cf06a19
Message:

Make Tailbone the default website, etc.

Location:
servers/host
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • servers/host/deploy/rattail/rattail.conf.template

    rcf06a19 r424abb3  
    2929
    3030[rattail.pod]
    31 pictures.gtin.root_url = http://pod.localhost/pictures/gtin
     31pictures.gtin.root_url = http://localhost:9080/pod/pictures/gtin
    3232pictures.gtin.root_path = /srv/pod/pictures/gtin
    3333
  • servers/host/deploy/rattail/rattail.localhost.conf

    rcf06a19 r424abb3  
    1111        Require all granted
    1212    </Directory>
     13
     14    # POD
     15    Alias /pod/ /srv/pod/
     16    <Directory /srv/pod/>
     17        Options +Indexes
     18        Require all granted
     19    </Directory>
     20
     21    # Forbid directory browsing of POD images; there are just too many.
     22    <DirectoryMatch "^/srv/pod/pictures/gtin/gtin-\d{3}">
     23        Options -Indexes
     24    </DirectoryMatch>
    1325
    1426    ErrorLog ${APACHE_LOG_DIR}/error.log
     
    2638    </Directory>
    2739
     40    # POD
     41    Alias /pod/ /srv/pod/
     42    <Directory /srv/pod/>
     43        Options +Indexes
     44        Require all granted
     45    </Directory>
     46
     47    # Forbid directory browsing of POD images; there are just too many.
     48    <DirectoryMatch "^/srv/pod/pictures/gtin/gtin-\d{3}">
     49        Options -Indexes
     50    </DirectoryMatch>
     51
    2852    ErrorLog ${APACHE_LOG_DIR}/error.log
    2953    LogLevel warn
  • servers/host/fabfile.py

    rcf06a19 r424abb3  
    1818
    1919
    20 __all__ = ['bootstrap_all', 'bootstrap_system', 'bootstrap_rattail', 'bootstrap_pod']
     20__all__ = ['bootstrap_all', 'bootstrap_system', 'bootstrap_rattail']
    2121
    2222# Set the 'live' role to the canonical hostname for this server.
     
    3030    warn("Couldn't import fabenv: {0}".format(error))
    3131
     32# Set some default env attrs in case fabenv isn't prepped.
     33if not hasattr(env, 'password_postgresql_rattail'):
     34    setattr(env, 'password_postgresql_rattail', 'password')
     35
    3236
    3337@task
     
    3842    bootstrap_system()
    3943    bootstrap_rattail()
    40     bootstrap_pod()
    4144
    4245
     
    6669
    6770    # misc
    68     apt.install('git', 'emacs-nox')
     71    apt.install('git', 'emacs-nox', 'emacs-goodies-el')
    6972   
    7073
     
    115118        sudo('bin/rattail --config app/rattail.conf initdb --with-admin', user='rattail')
    116119
    117     # website
    118     with cdvirtualenv('rattail', 'app'):
    119         mkdir('sessions', owner='rattail:rattail')
    120         deploy('rattail/web.conf', 'web.conf')
    121         deploy('rattail/rattail.wsgi', 'rattail.wsgi')
    122     append('/etc/hosts', '127.0.0.1       rattail.localhost', use_sudo=True)
    123     deploy('rattail/rattail.localhost.conf', '/etc/apache2/sites-available/rattail.localhost.conf')
    124     sudo('a2ensite rattail.localhost')
    125     sudo('service apache2 restart')
    126 
    127 
    128 @task
    129 def bootstrap_pod():
    130     """
    131     Bootstrap the POD images website.
    132     """
    133     # images
     120    # POD
    134121    mkdir('/srv/pod')
    135122    if getattr(env, 'rattail_download_pod', False):
     
    139126
    140127    # website
    141     append('/etc/hosts', '127.0.0.1       pod.localhost', use_sudo=True)
    142     deploy('pod/pod.localhost.conf', '/etc/apache2/sites-available/pod.localhost.conf')
    143     sudo('a2ensite pod.localhost')
     128    with cdvirtualenv('rattail', 'app'):
     129        mkdir('sessions', owner='rattail:rattail')
     130        deploy('rattail/web.conf', 'web.conf')
     131        deploy('rattail/rattail.wsgi', 'rattail.wsgi')
     132    deploy('rattail/rattail.localhost.conf', '/etc/apache2/sites-available/000-default.conf')
    144133    sudo('service apache2 restart')
Note: See TracChangeset for help on using the changeset viewer.