Skip to content

KUclap/KUclap-review

Repository files navigation


Logo

KUclap Back-End

Deploy-to-DO-production

Overview

This repository is KUclap back-end source code which is written in golang for implementing a web API and using it access to the database 🚀.

Documentation

Postman Collection 📝 URL : https://www.getpostman.com/collections/79cb50bda1b010277ac9

Built With 🔧

Getting Started

To get a local copy up and running follow these simple steps 🎉.

Prerequisites

Install these prerequisites ✅ .

  • Go
  • Docker

Installation

  1. Clone the repo
git clone https://github.com/KUclap/KUclap-review.git
  1. Install packages
go get ./...
# or
go mod download

Development / Usage

Use modd for live reloading by follow this command 😎 .

make gomodd

Deployment

Staging

This command is for deploying to Heroku 🤒 (Stagging Environment).

make deploy-to-staging

Pre-Production

Merge commits from master into pre-prod-release branch. The pipeline will deploy to Gandalf's server (DigitalOcean droplet) automatically 🤮.

git checkout pre-prod-release
git pull origin master
...
git push

Production

Like Pre-Production 😬, Merge commits from master into release branch. The pipeline will deploy to Gandalf's server (DigitalOcean droplet) automatically 😳 .

git checkout release
git pull origin master
...
git push

Note 🌶

  • For more details about commands, Please read Makefile.
  • .github/workflows is used for storing pipeline script for automated deployment.
  • You have to install heroku CLI for deploying image to staging.
  • Heroku only detects docker image (Dockerfile) which filename starting with 'D' capital letter.