[Adminsysters] working with git [was meeting 30 september 2020]

mara mara at multiplace.org
Fri Oct 2 00:45:41 CEST 2020


hallo,

the git repo needs to be downloafed from gitlab on our local machine.
then do the changes locally, and push to gitlab. Then a bare git is set
up with a hook of updating the live server project when gitlab's master
is updated. this way we can avoid having a git repo under the
/var/www/systerserver.net

@ignifugo I have set up a git user and installed a bare git under
/opt/git in my server to manage the update hooks.
Then my web projects owner is git.

I've attached here the hook I use for updating the live websites after I
push to master in case it helps.

m

On 10/2/20 12:23 AM, Angeliki Diakrousi wrote:
> I get the message that there is not a git repository inside
> /var/www/systerserver.net <http://systerserver.net>
> 
> Shall I push what it is inside the /var/www/systerserver.net
> <http://systerserver.net> and delete whatever is in the git (except
> README )?
> 
> Let me know.
> 
> Goodnight,
> Angeliki
> 
> On Thu, 1 Oct 2020, 22:57 ignifugo, <ignifugo at insicuri.net
> <mailto:ignifugo at insicuri.net>> wrote:
> 
> 
>     On 01/10/20 22:14, Angeliki Diakrousi wrote:
>>     There is not git connected to the pelican. Hmm... I dont remember
>>     what we did.
> 
>     it is this https://git.systerserver.net/systerserver/doc-website
> 
>     hugs
> 
>>
>>     angeliki
>>
>>     On Thu, 1 Oct 2020 at 21:56, ignifugo <ignifugo at insicuri.net
>>     <mailto:ignifugo at insicuri.net>> wrote:
>>
>>
>>         On 01/10/20 21:28, Angeliki Diakrousi wrote:
>>>         Hey Ignifugo. Are you there?
>>>
>>>         I 've styled a bit the main page of Systerserver. Very
>>>         simple. We can add 'articles' and document our meetings.
>>>
>>>         ~angeliki
>>
>>
>>         great! real minimal, clean :)
>>
>>         https://systerserver.net/
>>
>>         a starting point not more only a demo \o/, well!
>>
>>         maybe you forget to push in remote?
>>         https://git.systerserver.net/systerserver/doc-website
>>
>>         can you do?
>>
>>         I investigate on our old gitlab and repos..
>>
>>         https://git.systerserver.net/systerserver/notes/issues/9
>>
>>         I find a solution :) but I not pushed because I found only an
>>         old copy of etc repos..
>>
>>         I downloading the last backup. thanks I learned about bare-git
>>         repos... note in the issue :)
>>
>>         hugs ignifugo
>>
>>>
>>>         On Thu, 1 Oct 2020 at 20:37, ignifugo <ignifugo at insicuri.net
>>>         <mailto:ignifugo at insicuri.net>> wrote:
>>>
>>>
>>>             On 01/10/20 20:32, Donna Metzlar wrote:
>>>             > Well this all very painful. I've just created a room on
>>>             the Greenhost
>>>             > Jistsi server:
>>>             >
>>>             > https://meet.greenhost.net/systerserver
>>>
>>>             great!
>>>
>>>             Now I'm root on jean, Thanks Donna. but the repos are not
>>>             where I
>>>             expected :P
>>>
>>>             I added some doc to build the new website
>>>             https://git.systerserver.net/systerserver/doc-website
>>>
>>>             And now I experiment to find the repos.
>>>
>>>             hugs
>>>
>>>             > _______________________________________________
>>>             > Adminsysters mailing list
>>>             > Adminsysters at lists.genderchangers.org
>>>             <mailto:Adminsysters at lists.genderchangers.org>
>>>             >
>>>             https://lists.genderchangers.org/mailman/listinfo/adminsysters
>>>             _______________________________________________
>>>             Adminsysters mailing list
>>>             Adminsysters at lists.genderchangers.org
>>>             <mailto:Adminsysters at lists.genderchangers.org>
>>>             https://lists.genderchangers.org/mailman/listinfo/adminsysters
>>>
>>>
>>>
>>>         -- 
>>>         /~A~/
>>>         /w-i-t-m.net <http://w-i-t-m.net>
>>>         /
>>>         /
>>>         /
>>>         /
>>>         /
>>
>>
>>
>>     -- 
>>     /~A~/
>>     /w-i-t-m.net <http://w-i-t-m.net>
>>     /
>>     /
>>     /
>>     /
>>     /
> 
> 
> _______________________________________________
> Adminsysters mailing list
> Adminsysters at lists.genderchangers.org
> https://lists.genderchangers.org/mailman/listinfo/adminsysters
> 

-- 
mara.multiplace.org
-------------- next part --------------
#!/bin/bash
#
# An example hook script to prepare a packed repository for use over
# dumb transports.
#
# To enable this hook, rename this file to "post-update".

TARGET="/var/www/<project-name>"
GIT_DIR="/opt/git/<project-name>.git"
BRANCH="master"

while read oldrev newrev ref
do
        # only checking out the master (or whatever branch you would like to deploy)
        if [[ "$ref" = "refs/heads/master" ]]; then
                echo "Ref $ref received. Deploying ${BRANCH} branch to production..."
                git --work-tree="$TARGET" --git-dir="$GIT_DIR" checkout -f
        else
                echo "Ref $ref received. Doing nothing: only the ${BRANCH} branch may be deployed on this server."
        fi
done

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.genderchangers.org/pipermail/adminsysters/attachments/20201002/50633d17/attachment.sig>


More information about the Adminsysters mailing list