Code Monkey home page Code Monkey 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

Use make translate to import directly translations from the googlespreadshhet. Don't forget to set up first these 2 following environment parameter:

export DRIVE_USER=your_login
export DRIVE_PWD=your_password

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

$ make APACHE_BASE_PATH=elemoine apache 
$ APACHE_BASE_PATH=elemoine make 

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

$ cat rc_elemoine 
export APACHE_BASE_PATH=mypath
export APACHE_BASE_DIRECTORY=/home/elemoine/mf-geoadmin3
export API_URL=//mf-chsdi.3dev.bgdi.ch
export DEPLOY_TARGET=dev
$ 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 mf0t, 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
$ git checkout master
$ git pull origin master
$ 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 (Use make deploybranchint to also deploy it to 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/branch on both test and integration. The command adds a branch specific configuration to /var/www/vhosts/mf-geoadmin3/conf. This way, the deployed branch behaves exactly the same as any user specific deploy.

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

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

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

Watchers

 avatar  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.