animated-waddle

command module
v0.0.0-...-c6f9d0c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2024 License: MIT Imports: 2 Imported by: 0

README

animated-waddle

Animated Waddle is a template REST API backend built with Go and PostgreSQL. It includes support for custom PostgreSQL images that you can create and preload with data. The project also comes with Kubernetes configuration files for easy deployment.

Technologies and Libraries

  1. Go
  2. PostgreSQL
  3. Gofiber
  4. GORM
  5. Docker

Building and Running the Application

You can deploy the application using either Docker or Kubernetes. Below are instructions for both methods.

A. Create Custom PostgreSQL Docker Image
  1. Modify the database/init.sql file to define your databases, tables, relations, and any initial data you want to preload.
  2. During the build process, the Docker image will be created by executing the script inside the container.
Command to build the PostgreSQL Docker image:
docker build -f db.Dockerfile -t dhrypt/animated-waddle:latest .
Push the PostgreSQL Docker image to Docker Hub:
docker push dhrypt/animated-waddledb
To run the Docker image locally, use the following command:
docker run -d --rm -p 5432:5432 -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres --name animated-waddledb dhrypt/animated-waddledb:latest
B. Docker Compose

You can run the application using Docker Compose with the following command:

docker-compose up --build
C. Kubernetes

To deploy the application on a Kubernetes cluster, YAML files are provided for both the Go backend and PostgreSQL database.

Run the following commands to start the Kubernetes deployment and services:

kubectl apply -f deployment.yaml
kubectl apply -f postgres-deployment.yaml
Future Tasks
  1. Add tests
  2. Add support for gRPC
  3. Add support for GraphQL database
  4. Add support for Auto build and push to dockerhub through Github actions

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL