Project organization

Published

Updated

🗂️

App, environment, what?

On fortrabbit, one project is one app, and each stage of it, such as production and staging, is an environment. Other structures work too, with trade-offs in resources, domains and access.

Apps and environments

fortrabbit maps a web project in two layers:

Workflows

One structure is recommended. The others work, with downsides:

Projects as apps, environments are stages

- App: 'My website project'
  - Environment 1: 'Main' - live production
  - Environment 2: 'Dev' - feature development (optional)
raw

Use environments as versions of the website. When using git deployment, branches can be mapped to environments. See the multi staging article. Each app requires at least one environment. One app with one environment is also common.

Rating: ✅ ✅ ✅ ✅

Projects as folders in an environment

- App: 'My agency'
  - Environment 1: 'Main'
    - Folders: 'website-1', 'website-2' …
raw

Several projects share one environment, each in a folder. Routing domains to the folders needs .htaccess, and the projects share the database and the PHP processes. Multi-site features of a CMS work the same way. Separate installations are easier to scale and to hand over.

Rating: ❌ ❌ ✅ ✅

Project parts as environments

- App: 'website-1'
  - Environment 1: 'frontend'
  - Environment 2: 'backend'
raw

Environments map to parts of a web project. This may work for headless CMS systems, where frontend and backend are separated software.

Rating: ❌ ❌ ✅ ✅

Projects as environments

- App: 'My agency'
  - Environment 1: 'website-1'
  - Environment 2: 'website-2'
  - Environment 3: 'website-3'
raw

Each project gets an environment of one app. Access is granted per app, so a collaborator sees every project, and the projects share one Git repo.

Rating: ❌ ❌ ❌ ✅

Projects as apps, stages as folders

- App: 'website-1'
  - Environment 1: 'Main'
    - Folders: 'prod', 'staging'
raw

Stages live as folders in one environment. A deployment or a heavy job on staging slows production down, and both share the database.

Rating: ❌ ❌ ❌ ✅

Written by humans and AI in collaboration.

AI use & editorial processEdit on GitHub ↗