Skip to content

Commit

Permalink
Adjusted domain structure to fit new convention
Browse files Browse the repository at this point in the history
  • Loading branch information
codeinthehole committed Jul 25, 2012
1 parent de2a073 commit 17c3f5d
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions fabconfig.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Project-specific environment information.
Project-specific environment information.
This module provides configuration for the fabfile to run with. The idea is
that the fabfile is project-agnostic and all configuration takes place within
Expand Down Expand Up @@ -35,11 +35,11 @@ def _configure(build_name):

def test():
_configure('test')
env.hosts = ['test.%(project_code)s.%(client)s.%(domain)s'] % env
env.hosts = ['test-%(project_code)s-%(client)s.%(domain)s'] % env

def stage():
_configure('stage')
env.hosts = ['stage.%(project_code)s.%(client)s.%(domain)s'] % env
env.hosts = ['stage-%(project_code)s-%(client)s.%(domain)s'] % env

def prod():
_configure('prod')
Expand Down
6 changes: 3 additions & 3 deletions www/deploy/apache2/prod.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<VirtualHost *>
ServerAdmin sys@{{ domain }}
ServerName prod.{{ project_code }}.{{ client }}.{{ domain }}
ServerName prod-{{ project_code }}-{{ client }}.{{ domain }}
DocumentRoot /var/www/nginx-default

WSGIDaemonProcess {{ client }}-{{ project_code }}-prod processes=9 threads=10 display-name={{ client }}-{{ project_code }}-prod maximum-requests=10000
Expand All @@ -18,7 +18,7 @@
# - %T is time to serve the request in SECONDS
# - %D is time to serve the request in MICROSECONDS
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T/%D" timed
CustomLog /var/log/apache2/access.prod.{{ project_code }}.{{ client }}.{{ domain }}.log timed
ErrorLog /var/log/apache2/error.prod.{{ project_code }}.{{ client }}.{{ domain }}.log
CustomLog /var/log/apache2/access.prod-{{ project_code }}-{{ client }}.{{ domain }}.log timed
ErrorLog /var/log/apache2/error.prod-{{ project_code }}-{{ client }}.{{ domain }}.log

</Virtualhost>
6 changes: 3 additions & 3 deletions www/deploy/apache2/stage.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<VirtualHost *>
ServerAdmin sys@{{ domain }}
ServerName stage.{{ project_code }}.{{ client }}.{{ domain }}
ServerName stage-{{ project_code }}-{{ client }}.{{ domain }}
DocumentRoot /var/www/nginx-default

WSGIDaemonProcess {{ client }}-{{ project_code }}-stage processes=2 threads=5 display-name={{ client }}-{{ project_code }}-stage maximum-requests=10000
Expand All @@ -18,8 +18,8 @@
# - %T is time to serve the request in SECONDS
# - %D is time to serve the request in MICROSECONDS
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T/%D" timed
CustomLog /var/log/apache2/access.stage.{{ project_code }}.{{ client }}.{{ domain }}.log timed
ErrorLog /var/log/apache2/error.stage.{{ project_code }}.{{ client }}.{{ domain }}.log
CustomLog /var/log/apache2/access.stage-{{ project_code }}-{{ client }}.{{ domain }}.log timed
ErrorLog /var/log/apache2/error.stage-{{ project_code }}-{{ client }}.{{ domain }}.log

# This will need removing when we go live.
<Location />
Expand Down
6 changes: 3 additions & 3 deletions www/deploy/apache2/test.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<VirtualHost *>
ServerAdmin sys@{{ domain }}
ServerName test.{{ project_code }}.{{ client }}.{{ domain }}
ServerName test-{{ project_code }}-{{ client }}.{{ domain }}
DocumentRoot /var/www/nginx-default

WSGIDaemonProcess {{ client }}-{{ project_code }}-test processes=2 threads=5 display-name={{ client }}-{{ project_code }}-test maximum-requests=10000
Expand All @@ -18,8 +18,8 @@
# - %T is time to serve the request in SECONDS
# - %D is time to serve the request in MICROSECONDS
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T/%D" timed
CustomLog /var/log/apache2/access.test.{{ project_code }}.{{ client }}.{{ domain }}.log timed
ErrorLog /var/log/apache2/error.test.{{ project_code }}.{{ client }}.{{ domain }}.log
CustomLog /var/log/apache2/access.test-{{ project_code }}-{{ client }}.{{ domain }}.log timed
ErrorLog /var/log/apache2/error.test-{{ project_code }}-{{ client }}.{{ domain }}.log

# This will need removing when we go live.
<Location />
Expand Down
4 changes: 2 additions & 2 deletions www/deploy/nginx/prod.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server {
listen 80;
server_name prod.{{ project_code }}.{{ client }}.{{ domain }};
access_log /var/log/nginx/access.prod.{{ project_code }}.{{ client }}.{{ domain }};
server_name prod-{{ project_code }}-{{ client }}.{{ domain }};
access_log /var/log/nginx/access.prod-{{ project_code }}-{{ client }}.{{ domain }};

gzip on;
gzip_proxied any;
Expand Down
4 changes: 2 additions & 2 deletions www/deploy/nginx/stage.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server {
listen 80;
server_name stage.{{ project_code }}.{{ client }}.{{ domain }};
access_log /var/log/nginx/access.stage.{{ project_code }}.{{ client }}.{{ domain }};
server_name stage-{{ project_code }}-{{ client }}.{{ domain }};
access_log /var/log/nginx/access.stage-{{ project_code }}-{{ client }}.{{ domain }};

gzip on;
gzip_proxied any;
Expand Down
4 changes: 2 additions & 2 deletions www/deploy/nginx/test.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server {
listen 80;
server_name test.{{ project_code }}.{{ client }}.{{ domain }};
access_log /var/log/nginx/access.test.{{ project_code }}.{{ client }}.{{ domain }};
server_name test-{{ project_code }}-{{ client }}.{{ domain }};
access_log /var/log/nginx/access.test-{{ project_code }}-{{ client }}-{{ domain }};

gzip on;
gzip_proxied any;
Expand Down

0 comments on commit 17c3f5d

Please sign in to comment.