Permalink
Browse files

Build script instructions improved

  • Loading branch information...
1 parent 453489b commit 8cd65c9bead0c981561d9e857c77a431db0937f4 @feross committed Jun 12, 2012
Showing with 14 additions and 24 deletions.
  1. +8 −15 build-site/build.xml
  2. +1 −1 build-site/config/default.properties
  3. +1 −1 build-site/config/project.properties
  4. +3 −6 nginx.conf
  5. +1 −1 supervisor.conf
View
@@ -1,21 +1,21 @@
<?xml version="1.0"?>
-<project name="Boilerplate Build" default="build" basedir="../"> <!-- one back since we're in build/ -->
+<project name="Boilerplate Build" default="build" basedir="../"> <!-- one back since we're in build-site/ -->
<!-- Load in Ant-Contrib to give us access to some very useful tasks! -->
<!-- the .jar file is located in the tools directory -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
- <pathelement location="${basedir}/build/tools/ant-contrib-1.0b3.jar"/>
+ <pathelement location="${basedir}/build-site/tools/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<!-- load shell environment -->
<property environment="ENV" />
<!-- load property files -->
- <property file="build/config/project.properties"/>
- <property file="build/config/default.properties"/>
+ <property file="build-site/config/project.properties"/>
+ <property file="build-site/config/default.properties"/>
<!-- merge the stylesheet properties -->
<var name="stylesheet-files" value="${file.stylesheets}, ${file.default.stylesheets}"/>
@@ -424,7 +424,7 @@
<target name="-stop-server" description="Stop the tornado server">
<echo>Stopping the tornado server...</echo>
<exec executable="sudo" osfamily="unix">
- <arg line="supervisorctl -c ${dir.supervisor.config} stop instantfm:*"/>
+ <arg line="supervisorctl stop instantfm:"/>
</exec>
</target>
@@ -588,7 +588,7 @@
<!-- HTML -->
- <target name="-usemin" depends="-serverconfig" description="(PRIVATE) Replaces references to non-minified scripts">
+ <target name="-usemin" description="(PRIVATE) Replaces references to non-minified scripts">
<echo message="Switching to minified js files..."/>
<!-- switch from a regular jquery to minified -->
@@ -690,13 +690,6 @@
<targetfile/>
</apply>
</target>
-
-
- <target name="-serverconfig" description="(PRIVATE) Upgrades expires headers">
- <echo message="Upgrading expires header timeouts for js/css to 1yr..."/>
- <replace file="./${dir.publish}/${file.serverconfig}" token="access plus 2 months" value="access plus 1 year"/>
- </target>
-
<!-- CSS -->
<target name="-css" depends="-load-build-info" description="Concatenates and Minifies any stylesheets listed in the file.stylesheets property">
@@ -735,7 +728,7 @@
<target name="-reload-supervisord-config" description="Reload the supervisord config settings">
<echo message="Reloading the supervisord config settings..."/>
<exec executable="sudo" osfamily="unix">
- <arg line="supervisorctl -c ${dir.supervisor.config} update"/>
+ <arg line="supervisorctl update"/>
</exec>
</target>
@@ -753,7 +746,7 @@
<echo message="All the *essential* optimizations are done."/>
<echo message="Starting the server..."/>
<exec executable="sudo" osfamily="unix">
- <arg line="supervisorctl -c ${dir.supervisor.config} start instantfm:*"/>
+ <arg line="supervisorctl start instantfm:"/>
</exec>
</target>
@@ -10,7 +10,7 @@
#
dir.source = .
dir.publish = publish
-dir.build = build
+dir.build = build-site
dir.build.tools = ${dir.build}/tools
dir.test = test
dir.demo = demo
@@ -35,7 +35,7 @@ file.pages = server/templates/base.html
# Add any files or directories you add to the project and do not want to be copied to the publish directory as a
# comma separated lis
# These files are ignored in addition to the default ones specified in default.properties.
-file.exclude = misc/, README, supervisord.conf
+file.exclude = bin/, build/, include/, lib/, local/, src/, misc/, README.md, nginx.conf, requirements.txt, supervisor.conf
# Specify an environment to build
View
@@ -29,23 +29,20 @@ server {
client_max_body_size 50M;
# Path for static files
- #root /home/feross/www/instantfm.com/publish/static;
- root /home/feross/www/instantfm.com/static;
+ root /home/feross/www/instantfm.com/publish/static;
index index.html;
# Static assets
location ~* ^.+\.(manifest|appcache)$ {
expires -1;
- # root /home/feross/www/instantfm.com/publish/static;
- root /home/feross/www/instantfm.com/static;
+ root /home/feross/www/instantfm.com/publish/static;
access_log /home/feross/www/log/nginx/static.log;
}
# Set expires max on static file types
location ~* ^.+\.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|eot|mp4|ogg|ogv|webm)$ {
expires max;
- # root /home/feross/www/instantfm.com/publish/static;
- root /home/feross/www/instantfm.com/static;
+ root /home/feross/www/instantfm.com/publish/static;
access_log off;
}
View
@@ -2,7 +2,7 @@
user=www-data
process_name=instantfm-%(process_num)s
directory=/home/feross/www/instantfm.com/
-command=/home/feross/www/instantfm.com/bin/python server/server.py --port=%(process_num)s
+command=/home/feross/www/instantfm.com/bin/python publish/server/server.py --port=%(process_num)s
environment=PYTHON_EGG_CACHE='/tmp/python-eggs'
redirect_stderr=true
stdout_logfile=/home/feross/www/log/instantfm.com/access-%(process_num)s.log

0 comments on commit 8cd65c9

Please sign in to comment.