diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..5d532fb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM busybox +WORKDIR /app +COPY templates/ templates/ +COPY micrach ./ +ENTRYPOINT ["/app/micrach"] \ No newline at end of file diff --git a/main.go b/main.go index 861d2dd..160cda1 100644 --- a/main.go +++ b/main.go @@ -9,14 +9,14 @@ import ( Config "micrach/config" Controllers "micrach/controllers" - Db "micrach/db" + // Db "micrach/db" // Utils "micrach/utils" ) func main() { Config.Init() - Db.Init() - defer Db.Pool.Close() + // Db.Init() + // defer Db.Pool.Close() gin.SetMode(Config.App.Env) router := gin.Default() @@ -27,7 +27,8 @@ func main() { router.GET("/:threadId", Controllers.GetThread) router.POST("/:threadId", Controllers.UpdateThread) + log.Println("port", Config.App.Port, "- online") log.Println("all systems nominal") - router.Run("localhost:" + strconv.Itoa(Config.App.Port)) + router.Run(":" + strconv.Itoa(Config.App.Port)) }