Giter Club home page Giter Club logo

inca-survey's Introduction

Lab Agora - Survey Web Application

Survey Web Application using Tell Me for Lab Agora, an Institut National Du Cancer public startup helping French actors in the fight against cancer to establish beneficial relationships between patients and other actors.

Deployment

Following our global deployment strategy:

ssh <USERNAME>@<SERVER_IP>
mkdir ~/deployments/inca-survey

Add the current proxy Git repository workflow:

git init --bare ~/repositories/inca-survey.git
vim ~/repositories/inca-survey.git/hooks/post-receive

which could look like this:

#!/bin/bash

# Exit when any command fails:
set -e

TARGET="/home/<USERNAME>/deployments/inca-survey"
GIT_DIR="/home/<USERNAME>/repositories/inca-survey.git"
BRANCH="main"

while read oldrev newrev ref
do
  # Only checking out the specified branch:
  if [[ $ref = "refs/heads/${BRANCH}" ]]; then
    echo "Git reference $ref received. Deploying ${BRANCH} branch to production..."
    git --work-tree="$TARGET" --git-dir="$GIT_DIR" checkout -f "$BRANCH"
    cd $TARGET
    sudo make start
  else
    echo "Git reference $ref received. Doing nothing: only the ${BRANCH} branch may be deployed on this server."
  fi
done

Give the execution rights:

chmod +x ~/repositories/inca-survey.git/hooks/post-receive

You can now exit and go into you your local proxy directory to add your server repository reference:

git remote add live ssh://<USERNAME>@<SERVER_IP>/home/<USERNAME>/repositories/inca-survey.git

Everything is now ready for the proxy part and you will now be able to push any new commit to production via:

git push live main

Commands

make backup # Dump MongoDB database
make restore # Restore MongoDB database

inca-survey's People

Contributors

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