Personal Infrastructure — Source Code Management

Photo by Clément H on Unsplash

Source Code Management Options

Personal Infrastructure

Setting Up Your Own Tools with Docker

// This installs updates to the software sources on Ubuntu via "apt" which is the package manager for Ubuntu
$ sudo apt-get update

// This installs SSL style apt installs, new CA certificates, the last install "software-properties-common" will help install 3rd party software with apt
$ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
// This installs the required location for the docker software, and let's apt know where to find it
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
# Install docker
$ sudo apt install docker-ce
// This starts a gogs server and detaches it from your session, on shut down the container is removed. The data in /var/gogs should exist after container is removed.
$ sudo docker run -d --rm --name=gogs-server -p 10022:22 -p 10080:3000 -v /var/gogs:/data gogs/gogs
Page Header on “install” page
Example of path configuration

Create a Repository

Step 1) Create New Repository Step 2) Complete form Step 3) Copy Git URL
// Clone new Repo to your machine
$ git clone GIT_URL
// Check current state of working directory
$ git status
// Add new source code to the repository
$ git add .
// Add a message about the code you are adding
$ git commit -m "Added example source code"
// Send the code to your Source Code Management server
$ git push

--

--

Coffee Drinker, Chief Engineer of Dancing at Desk, Foodie, HyperText Transfer Operator, Overly energetic and active! 💻 ☕

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
John Stupka

Coffee Drinker, Chief Engineer of Dancing at Desk, Foodie, HyperText Transfer Operator, Overly energetic and active! 💻 ☕