1. Home
  2. Docs
  3. Development
  4. Software Environments

Software Environments

TownSites is split into multiple environments, which communicate with each other via Git. Our Github account ensures everything stays in sync throughout the development process.

  • The Production Environment is where customers and staff interact with TownSites. It pulls its code from the main branch, which is not edited directly.
    • Primary URL: townsites.org
    • Example of an individual TownSite URL: northville.townsites.org
  • The Staging Environment is where testing occurs before deploying to Production. It pulls its code from the dev branch.
    • Primary URL: staging.townsites.dev
    • Example of an individual TownSite URL: staging.townsites.dev/northville
  • Developer Environments are clones of the staging environment, hosted on the same server. There is one Developer Environment per developer. These environments also pull their code from the dev branch.
    • Primary URL: devXX.townsites.dev
    • Example of an individual TownSite URL: devXX.townsites.dev/northville

Note how the URL uses subdomains in Production and subdirectories in development environments. This is intentional and code should work correctly regardless of file structure. The function get_host_info(), available in all PHP scripts, returns information about the current environment.

Articles