Tutorial: Deploying Pier

This tutorial describes how to deploy Pier on a Debian Linux distribution (Mac OS X users please refer to Pier headless on Mac OS X). It assumes that you have a pier.image image that you want to install on a Debian Linux installation with Apache 2 under a domain called www.YOURDOMAIN.com.

Start up

  • Download the Pier one click image
  • Copy to the /srv/site folder the followings:
    • pier.image,
    • pier.changes,
    • files/ folder, and
    • Pharo10.sources.
  • You can run the image headless by using the following bash script:

VM_PARAMS="-mmap 200m -vm-sound-null -vm-display-null"

#start the vm

Setting up Apache2

  • Make sure that mod_proxy and mod_rewrite are installed and are enabled
  • Go to /etc/apache2/sites-available and create the following configuration:

  # set serer name
  ProxyPreserveHost On
  ServerName www.YOURDOMAIN.com

  # connfigure static file serving
  DocumentRoot /srv/site/files
  <Directory /srv/site/files>
    Order deny,allow
    Allow from all

  # rewrite incoming requests
  RewriteEngine On
  RewriteRule ^/pier(.*)$ http://www.YOURDOMAIN.com$1 [redirect,last]
  RewriteRule ^/files/(.*)$ http://localhost:8080/files/$1 [proxy,last]
  RewriteCond /srv/site/files/%{REQUEST_FILENAME} !-f
  RewriteRule ^/(.*)$ http://localhost:8080/pier/$1 [proxy,last]

  • Go to /etc/apache2/sites-enabled and make a soft link to your configuration

Configuring Seaside

  • Edit the configuration of the Pier application located in the /config:
    • Set the Server Hostname to: http://www.YOURDOMAIN.com
    • Set the Server Path to: /
    • Set the Base Path to: /
  • Set the Deployment Mode to true

Make Pier work with Apache2

Set the baseURL to: http://www.YOURDOMAIN.com