TurboGears

TurboGears is an open source web application framework.

Deploying an Existing TurboGears 2 Project

To deploy a TurboGears project that has been developed outside of the WebFaction environment:

  1. Create a TurboGears application.
    1. Log in to the WebFaction control panel.
    2. Click Domains / websites ‣ Applications. The Apps list appears.
    3. Click the Add new (add new) button. The Add page appears.
    4. In the Name field, enter a name for the application.
    5. In the App category menu, click to select TurboGears.
    6. Click the Create button. The View page appears with a confirmation message.
    7. Make a note of the Port number. This number is required later.
  2. Remove the provided TurboGears starter project.
    1. Open an SSH session.
    2. Switch to the TurboGears application directory. Enter cd ~/webapps/application where application is the name of the application as it appears in the WebFaction control panel and press Enter.
    3. Remove the starter project. Enter rm -r ./application where application is the name of the application as it appears in the WebFaction control panel and press Enter.
  3. Upload the TurboGears project to a subdirectory of the application directory. For example if the project is named myproject, upload the project to ~/webapps/application/myproject.
  4. Update development.ini.
    1. Open an SSH session.
    2. Switch to the project directory. Enter cd ~/webapps/application/project where application is the name of the application as it appears in the WebFaction control panel and project is the name of the TurboGears project, and press Enter.
    3. Open development.ini in a text editor.
    4. In the [server:main] section, replace the line starting with port = with port = number where number is the port number provided for the application in the WebFaction control panel.
    5. Save and close the file.
  5. Update the crontab entry.
    1. Enter crontab -e and press Enter.
    2. Edit the line containing cd /home/username/webapps/application/application; ../bin/paster --serve --daemon development.ini to contain cd /home/username/webapps/application/project; ../bin/paster --serve --daemon development.ini where:
      • username is the account name,
      • application is the application name as it appears on the WebFaction control panel,
      • and project is the name of the uploaded project.
    3. Save and close the file.
  6. Restart TurboGears.
    1. Stop the TurboGears application. From the project directory, enter cd ..; ./bin/paster serve --stop-daemon and press Enter.
    2. Restart the TurboGears application. Enter ./bin/paster serve --daemon development.ini and press Enter.

Previous topic

Trac

Next topic

WebDAV

Search the documentation

Example: "configure email" or "create database"

Feedback

Send us your feedback on this documentation.