-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotes.txt
More file actions
37 lines (31 loc) · 1.9 KB
/
notes.txt
File metadata and controls
37 lines (31 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
https://www.digitalocean.com/community/tutorials/how-to-set-up-automatic-deployment-with-git-with-a-vps
use the git --bar system to update the beta and production website
mkdir mesoscope_beta.git;cd mesoscope_beta.git; git init --bare;
on mgl2 there is two bar repo in /usr/local/repos/ or /usr/local and they are hook to the www projects/mesoscope and projects/mesoscopebeta
on push live master and push beta master change are automatically pass
here is the hoook as a shell script (e.g. repo/hooks/post-receive):
#!/bin/sh
#checkout the repo
git --work-tree=/usr/local/www/projects/mesoscopebeta --git-dir=/usr/local/repo/mesoscope_beta.git checkout -f
#change python header to be executable on mgl2, make executable
ex -c ':1d' -c ':wq' /usr/local/www/projects/mesoscopebeta/cgi-bin/cellpack_db_dev.cgi
chmod +x /usr/local/www/projects/mesoscopebeta/cgi-bin/cellpack_db_dev.cgi
ex -c ':1d' -c ':wq' /usr/local/www/projects/mesoscopebeta/cgi-bin/get_geom_dev.cgi
alternative for the hook can be found here :
https://gist.github.com/noelboss/3fe13927025b89757f8fb12e9066f2fa
on the local git clone working copy simply add the two remote
git clone orca:/mnt/raid/services/git/mesoscope.git
git remote add live ssh://autin@mgl2.scripps.edu/usr/local/repo/mesoscope_release.git
git remote add beta ssh://autin@mgl2.scripps.edu/usr/local/repo/mesoscope_beta.git
git remote add live_virtual ssh://autin@mesoscope.scripps.edu/var/local/mesoscope_release.git/
git remote add beta_virtual ssh://autin@mesoscope.scripps.edu/var/local/mesoscope_beta.git/
#for developement
git push origin master
#for testing online
git push beta master
#for deploying
git push beta_virtual master
alternative could be to use the hook directly on origin but for a particular branch
#python -m http.server --cgi
# also need to chown the /var/html/ folders so the hook has permission to write.
# check SELinuc on the server for cgi-execution httpd_sys_script_exec_t