Skip to content

Guide for a web development machine which deploys on push.

Notifications You must be signed in to change notification settings

msashlee/myGitDevGuide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Gitolite-Apache2-Autodeploy on Ubuntu Setup

Basic Steps

  • HowtoForge: Minimal 16.04 Server

    • Minimal Virtual Server Install Mode (if not on virtual machine use Minimal Server)
    • Software Selections:
      • OpenSSH
      • Basic Ubuntu Server / Standard system utilities
    • Personally, I only use sudo -s and do not enable root user. This is up to you, its your machine
    • Secure SSH
    • Update, upgrade, dist-upgrade
    • Set static IP & FQDN
  • HowtoForge: LAMP on 16.04

    • Additional PHP packages: (deciding to take an 'install when needed approach') I only added php7.0-mysql.
    • I did not enable SSL (i want to be working before messing with SSL)
    • No PhpMyAdmin
  • Good time for a Snapshot if VM

  • Install Gitolite3 - Ubuntu Git Guide - See Bottom Section

    • MAKE SURE YOU INSTALL GITOLITE3!!!! We need v3.6+ for repo-specific-hooks
    • apt-get install gitolite3
    • gl-setup /tmp/*.pub run from the git user is incorrect on Ubuntus site..
    • Use gitolite setup -pk /tmp/*.pub on git user
  • Configuring Gitolite3 - Gitolite Basic Admin

  • Configure Wild Repos - Gitolite3 Wild Repos

  • Configure custom hooks (sections 4.2 - 4.4) - Gitolite3 Cookbook

    • Add your own hooks in your gitolite-admin repository under:
    • gitolite-admin/local/hooks/repo-specific/
    • my post receive hook can be found here
    • Enable your hook in gitolite-admin/conf/gitolite.conf with a config like

    repo testing

    RW+ = @all

    option hook.post-receive = deploy

  • You should now be able to pull the testing directory from your remote, add an index.html file, commit it, push it to your server and visit it at http://yourserver.tdl/testing/index.html

About

Guide for a web development machine which deploys on push.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published