Giter Site home page Giter Site logo

mf-geoadmin3's Introduction

mf-geoadmin3

next generation map.geo.admin.ch

Build Status

Getting started

Checkout the source code:

$ git clone https://github.com/geoadmin/mf-geoadmin3.git

or when you're using ssh key (see https://help.github.com/articles/generating-ssh-keys):

$ git clone [email protected]:geoadmin/mf-geoadmin3.git

Build:

$ make all

Use make help to know about the possible make targets and the currently set variables:

$ make help

Variables have sensible default values for development. Anyhow, they can be set as make macros or envvars. For example:

$ make BASE_URL_PATH=/elemoine apache 
$ BASE_URL_PATH=/elemoine make 

You can customize the build by creating an rc file that you source once. Ex:

$ cat rc_elemoine 
export BASE_URL_PATH=/mypath
export SERVICE_URL=/http://mf-chsdi.dev.bgdi.ch
$ source rc_elemoine 
$ make  

For builds on test (rc_dev), integration (rc_ab) and production (rc_prod), you should source the corresponding rc file.

On mf1t, create an Apache configuration file for your environment. Ex:

$ cat /var/www/vhosts/mf-geoadmin3/conf/00-elemoine.conf
Include /home/elemoine/mf-geoadmin3/apache/*.conf 

Deploying project and branches

Deploying the project (branch master)

Update and build the project in the main directory of the vhost as describe above

$ cd /var/www/vhosts/mf-geoadmin3/private/geoadmin
$ make all  && sudo apache2ctl graceful

And test it.

Deploy to the integration server (ab = Abnahme = integration):

$ sudo -u deploy deploy -r deploy/deploy.cfg ab

And test on http://mf-geoadmin3.int.bgdi.ch/

Deploying a branch

Use make deploybranch in your working directory to deploy your current branch to test and integration. The code for deployment, however, does not come from your working directory, but does get cloned (first time) or pulled (if done once) directly from github. So you'll likely use this command after you push your branch to github.

Use make deploybranch GIT_BRANCH=dev_other_branch to deploy a different branch than the one you are currently working on. Make sure that the branch specified exists on github.

The first time you use the command will take some time to execute.

The code of the deployed branch is in a specific directory /var/www/vhosts/mf-geoadmin3/private/branches on both test and integration. The apache configuration for all branches is in apache/branches.conf, which should be the same accross all branches. It puts all branches under the url /branch/. The 00-branches.conf in the vhost configuration points to the latest deployed branch.

Sample path: http://mf-geoadmin3.int.bgdi.ch/branch/dev_bottombar/prod

Overview of all deployed branches: http://mf-geoadmin3.int.bgdi.ch/branch

Please only use integration url for external communication (including here on github), even though the exact same structure is also available on our test instances.

mf-geoadmin3's People

Contributors

cedricmoullet avatar gjn avatar elemoine avatar fredj avatar loicgasser avatar tonio avatar procrastinatio avatar sbrunner avatar bbinet avatar oterral avatar alcapat avatar daguer avatar afoletti avatar

Watchers

James Cloos avatar Nicolas Brisebois-Tétreault avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.