Giter Site home page Giter Site logo

alterra-agmc's Introduction

Altera Golang Mini Course (AGMC)

This project (alterra-agmc) is a RESTful API with an agnostic approach, so developers only need to think about the business process.

Alt text

Features

  • Support RESTful API. e.g. User & Book.
  • Support Object Relational Mapping (ORM) concept.
  • Implement clean architecture (Hexagonal Architecture) on main project.
  • Implement common design pattern.

Tech

AGMC project uses a number of open source project to work properly:

  • Go - Programming language
  • Docker - Containerization
  • MySQL - Relational database
  • Heroku - Deployment image to server

Installation

AGMC project requires go version go1.19 to run.

Initiate new table and start the server.

cd alterra-agmc
go run main.go -migrate=migrate

Please import Postman Collection to test this project.

Docker

AGMC project is very easy to install and deploy in a Docker container.

By default, the Docker will expose port 8080, so change this within the Dockerfile if necessary. When ready, simply use the Dockerfile to build the image.

cd alterra-agmc
docker build -t <youruser>/alterra-agmc:<tag>

This will create the alterra-agmc image and pull in the necessary dependencies. Be sure to swap out <tag> with the actual version of AGMC.

Once done, run the Docker image and map the port to whatever you wish on your host. In this example, we simply map port 8082 of the host to port 8080 of the Docker (or whatever port was exposed in the Dockerfile):

docker run -d -p 8082:8080 --restart=always --name=alterra-agmc <youruser>/alterra-agmc:<tag>

Note: --restart=always to configure the restart policy for a container.

Verify the deployment by navigating to your server address in your preferred browser.

127.0.0.1:8082

Docker Hub

You can push your docker image to private or public repository to docker hub registry container. In the free tier you are given only 1 private repository and unlimited for public repository. Please refer here for more information.

Push you docker image to docker hub registry:

docker push <youruser>/alterra-agmc:<tag>

Ref:

alterra-agmc's People

Contributors

faizalnurrozi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.