AndresXLP / enerBit-system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clone with ssh recommended
$ git clone git@github.com:AndresXLP/enerBit-system.git

Clone with https
$ git clone https://github.com/AndresXLP/enerBit-system.git

Requirements

  • go v1.20
  • go modules

Technology Stack

Architecture

Build

  • Install dependencies:
$ go mod download
$ curl -L https://github.com/golang-migrate/migrate/releases/download/v4.15.2/migrate.linux-amd64.tar.gz | tar xvz
$ migrate -path ./internal/infra/resource/postgres/migrations -database postgresql://${POSTGRESQL_DB_USER}:${POSTGRESQL_DB_PASSWORD}@${POSTGRESQL_DB_HOST}:${POSTGRESQL_DB_PORT}/${POSTGRESQL_DB_NAME}?sslmode=disable up
  • Run local
$ go run cmd/main.go
  • Run with Docker:
$ make compose-up 

Environments

Required environment variables

  • SERVER_HOST: host for the server
  • SERVER_PORT: port for the server
  • DB_HOST: host database
  • DB_USER: user database
  • DB_PASSWORD: password database
  • DB_NAME: name database
  • DB_PORT: port database
  • REDIS_HOST: host redis
  • REDIS_PORT: port redis

Contributors

  • Andres Puello

About


Languages

Language:Go 95.9%Language:Makefile 3.0%Language:PLpgSQL 0.7%Language:Dockerfile 0.4%