Guide - Web Project Environment

From CsWiki
Revision as of 10:59, 8 March 2020 by Shaiy (Talk | contribs) (Users and Permissions)

Jump to: navigation, search
By Shai Yerushalmi
Last update 26.11.2019

First there is a need to create a name for the project which will be its url subdomain i.e. for project name 'myproject' -

Users and Permissions

The project is managed by an actual single user who is the developer in charge.

Additional webserver user will run the web services CSE system will create a user for the webserver to which only cs system can use for security reasons; For each project there will be a group. This group will have all the developers for this projects + the webserver user.

User: pr_<project_name>

Group: pr_<project_name>

Files System

The main folder will be the lab/project main folder in which there will be a folder called webserver. Under the webserver folder there will be folder for each environment. Although not all environment will be used during the development phase the file tree is still a must.

For projects which contains scripts for the projects which includes scripts other than web

Root project folder


project group permissions


Directory Structure

Every project will have three environments for production, testing and development if needed


[production | release | develop]
webserver/# developer allowed to git pull + write
data/ ## web server user + group allowed to write
logs/ ## web server user + group allowed to write
[ slurp/ ## slurp scripts (if required)]


  • used for share info
  • project group permissions


<project_name> (git branch master)

<project_name> (used to be testing, git branch release)

<project_name> (used to be development if needed, git branch develop)


The recommended database is postgres. It is not always the #1 choice of all the developers, yet it extremely powerful and flexible and worth the extra effort required for the initial setup.


Each environment will get a database in which you can add multiple schemas

<projectname>_production (used to be production)

<projectname>_release (used to be release)

<projectname>_develop(used to be development


Same naming convention as Postgres


Log records that are related to server or database errors save to the syslog, so it can be viewed and monitor by the cs-system.

Other log records should be in internal folder of the environment.

Email Aliases

Email alias will be created for the project upon request in order to use for email alerts / API external account/ logins etc.,



Daemons will run on a specific user which belong to the webserver group. There will not be a specific user for running daemons.

Git Branching

There are many git branching methodologies. Yet, since often we will need to help with implementation or some maintenance, the git branching is important to be comprehensive and reliable for usage. Therefore we follow specific guidelines strictly, according to the documentation of bitbucket got gitflow workflow

master (production) -> hotfix

release (testing / release / staging)
develop (development)
  • hotfix - a branch used for quick fixes on master, use only on emergency!
  • Please be caution on rebase and merge.
  • Before merging a branch up a child branch, make sure you rebase the parent branch since it may be changed by another developer.